Methods summary
public
ObjectContainerInterface
|
#
setModelFactory( Charcoal\Factory\FactoryInterface $factory )
Set an object model factory.
Set an object model factory.
Parameters
- $factory
- The model factory, to create objects.
Returns
ObjectContainerInterface Chainable
|
protected
Charcoal\Factory\FactoryInterface
|
#
modelFactory( )
Retrieve the object model factory.
Retrieve the object model factory.
Returns
Charcoal\Factory\FactoryInterface
Throws
RuntimeException If the model factory was not previously set.
|
public
Charcoal\Object\ObjectScheduleInterface
|
#
setTargetType( string $targetType )
Set the scheduled object's type.
Set the scheduled object's type.
Parameters
- $targetType
- The object type (model).
Returns
Throws
InvalidArgumentException If the object type parameter is not a string.
Implementation of
|
public
string
|
#
targetType( )
Retrieve the scheduled object's type.
Retrieve the scheduled object's type.
Returns
string
Implementation of
|
public
Charcoal\Object\ObjectScheduleInterface
|
#
setTargetId( mixed $targetId )
Set the scheduled object's ID.
Set the scheduled object's ID.
Parameters
Returns
Implementation of
|
public
mixed
|
#
targetId( )
Retrieve the scheduled object's ID.
Retrieve the scheduled object's ID.
Returns
mixed
Implementation of
|
public
Charcoal\Object\ObjectRevision
|
#
setDataDiff( array|string $data )
Parameters
Returns
Implementation of
|
public
array
|
#
dataDiff( )
Returns
array
Implementation of
|
public
Charcoal\Object\ObjectScheduleInterface
|
#
setProcessed( boolean $processed )
Set the schedule's processed status.
Set the schedule's processed status.
Parameters
- $processed
- Whether the schedule has been processed.
Returns
|
public
boolean
|
#
processed( )
Determine if the schedule has been processed.
Determine if the schedule has been processed.
Returns
boolean
|
public
QueueItemInterface
|
#
setScheduledDate( null|string|DateTimeInterface $ts )
Set the date/time the item should be processed at.
Set the date/time the item should be processed at.
Parameters
- $ts
- A date/time string or object.
Returns
QueueItemInterface Chainable
Throws
InvalidArgumentException If the date/time is invalid.
Implementation of
|
public
null|DateTimeInterface
|
#
scheduledDate( )
Retrieve the date/time the item should be processed at.
Retrieve the date/time the item should be processed at.
Returns
null|DateTimeInterface
Implementation of
|
public
QueueItemInterface
|
#
setProcessedDate( null|string|DateTimeInterface $ts )
Set the date/time the item was processed at.
Set the date/time the item was processed at.
Parameters
- $ts
- A date/time string or object.
Returns
QueueItemInterface Chainable
Throws
InvalidArgumentException If the date/time is invalid.
Implementation of
|
public
null|DateTimeInterface
|
#
processedDate( )
Retrieve the date/time the item was processed at.
Retrieve the date/time the item was processed at.
Returns
null|DateTimeInterface
Implementation of
|
public
QueueItemInterface
|
#
preSave( )
Hook called before saving the item.
Hook called before saving the item.
Presets the item as to-be processed and queued now.
Returns
QueueItemInterface Chainable
|
public
boolean
|
#
process( callable $callback = null, callable $successCallback = null, callable $failureCallback = null )
Process the item.
Parameters
- $callback
- An optional callback routine executed after the item is processed.
- $successCallback
- An optional callback routine executed when the item is resolved.
- $failureCallback
- An optional callback routine executed when the item is rejected.
Returns
boolean Success / Failure
Implementation of
|