AbstractJob

implements Omeka\Job\JobInterface

Known subclasses

Omeka\Job\BatchDelete, Omeka\Job\BatchUpdate
Abstract
Open source code
Methods Summary
public
# __construct( Omeka\Entity\Job $job , Zend\ServiceManager\ServiceLocatorInterface $serviceLocator )
Inject dependencies.
public
# getArg( string $name , mixed $default = NULL )
Get a Job argument by name. Assumes that the job arguments are an array.
public
# shouldStop( )
Check if this job should stop. Typically called from within an iteration and followed by whatever logic is needed to gracefully clean up the job, in turn followed by a break out of the iteration and no further work. Queries the database for the Job object since the process that sets STATUS_STOPPING is not necessarily the same process that this job is running on. We're not using the entity manager's refresh method because we can't assume a static Job state during the course of the job.
public
# setServiceLocator( Zend\ServiceManager\ServiceLocatorInterface $serviceLocator )
Set the service locator for this job.
public
# getServiceLocator( )
Get the service locator.
Properties Summary
protected Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
# NULL
protected Omeka\Entity\Job $job
# NULL