Omeka_Job_Dispatcher_Adapter_AbstractAdapter

Package: Job\Dispatcher\Adapter

class Omeka_Job_Dispatcher_Adapter_AbstractAdapter

implements Omeka_Job_Dispatcher_Adapter_AdapterInterface

Abstract class for job dispatcher adapters.

Omeka_Job_Dispatcher_Adapter_AbstractAdapter::__construct($options = null)
Parameters:
  • $options (array|null) – Optional Options to instantiate in the adapter.

Omeka_Job_Dispatcher_Adapter_AbstractAdapter::_setOptions($options)
Parameters:
  • $options

Omeka_Job_Dispatcher_Adapter_AbstractAdapter::getOption($name)

Retrieve an option by name as it was passed to the constructor of the adapter.

Parameters:
  • $name (string) –

Omeka_Job_Dispatcher_Adapter_AbstractAdapter::hasOption($name)

Whether or not the given option has been set.

Parameters:
  • $name (string) –

Omeka_Job_Dispatcher_Adapter_AbstractAdapter::setQueueName($name)

Adapter implementations do not understand named queues by default, so this default implementation returns false. Override this in subclasses to specify the correct behavior.

Parameters:
  • $name

Omeka_Job_Dispatcher_Adapter_AbstractAdapter::send($encodedJob, $metadata)

Send the job to whatever underlying system is used by the adapter.

Parameters:
  • $encodedJob (string) – The job encoded as a string. In most cases, this will be passed directly into whatever client or queue the adapter uses.

  • $metadata (array) – An array containing all the metadata for the job. This is the unencoded version of the first argument and exists as a convenience so that adapter writers do not have to attempt to decode the first argument manually. This array contains the following keys: <ul> <li>className - Corresponds to the class name of the job.</li> <li>options - Options that are passed to the job when it is instantiated.</li> <li>createdBy - User object (or null) corresponding to the user who created this job.</li> <li>createdAt - Zend_Date corresponding to the date/time at which this job was created.</li> </ul>