Omeka_Job_AbstractJob

Package: Job

class Omeka_Job_AbstractJob

implements Omeka_Job_JobInterface

Abstract implementation of an Omeka job.

Most plugin implementations of jobs will extend this class to gain convenient access to the database and other potentially important resources.

property Omeka_Job_AbstractJob::$_db

protected Omeka_Db

property Omeka_Job_AbstractJob::$_dispatcher

protected Omeka_Job_Dispatcher_DispatcherInterface

property Omeka_Job_AbstractJob::$_user

protected User

property Omeka_Job_AbstractJob::$_options

protected

Omeka_Job_AbstractJob::__construct($options)
Parameters:
  • $options

Omeka_Job_AbstractJob::_setOptions($options)

Set all the options associated with this task.

This is a convenience method that calls setter methods for the options given in the array. If an element in the array does not have an associated setter method, it will be passed into the options array.

Parameters:
  • $options

Omeka_Job_AbstractJob::setDb(Omeka_Db $db)
Parameters:
Omeka_Job_AbstractJob::setJobDispatcher(Omeka_Job_Dispatcher_DispatcherInterface $dispatcher)
Parameters:
Omeka_Job_AbstractJob::setUser(User $user)

Set the given User object on the Job object.

Parameters:
Omeka_Job_AbstractJob::getUser()

Get the User currently set on this Job, if any.

Returns:

User|null

Omeka_Job_AbstractJob::resend()

Resend the job using the same options that were passed to the current job.

Omeka_Job_AbstractJob::perform()