$modelFactory
$modelFactory : \Charcoal\Factory\FactoryInterface
Store the factory instance for the current class.
The object schedule class allows object properties to be changed at a scheduled time.
setModelFactory(\Charcoal\Factory\FactoryInterface $factory) : \Charcoal\Object\ObjectContainerInterface
Set an object model factory.
\Charcoal\Factory\FactoryInterface | $factory | The model factory, to create objects. |
Chainable
setTargetType(string $targetType) : \Charcoal\Object\ObjectScheduleInterface
Set the scheduled object's type.
string | $targetType | The object type (model). |
If the object type parameter is not a string.
Chainable
setTargetId(mixed $targetId) : \Charcoal\Object\ObjectScheduleInterface
Set the scheduled object's ID.
mixed | $targetId | The object ID. |
Chainable
setDataDiff(array|string $data) : \Charcoal\Object\ObjectRevision
array|string | $data | The data diff. |
setProcessed(boolean $processed) : \Charcoal\Object\ObjectScheduleInterface
Set the schedule's processed status.
boolean | $processed | Whether the schedule has been processed. |
Chainable
setScheduledDate(null|string|\DateTimeInterface $ts) : \Charcoal\Object\QueueItemInterface
Set the date/time the item should be processed at.
null|string|\DateTimeInterface | $ts | A date/time string or object. |
If the date/time is invalid.
Chainable
setProcessedDate(null|string|\DateTimeInterface $ts) : \Charcoal\Object\QueueItemInterface
Set the date/time the item was processed at.
null|string|\DateTimeInterface | $ts | A date/time string or object. |
If the date/time is invalid.
Chainable
process(callable $callback = null, callable $successCallback = null, callable $failureCallback = null) : boolean
Process the item.
callable | $callback | An optional callback routine executed after the item is processed. |
callable | $successCallback | An optional callback routine executed when the item is resolved. |
callable | $failureCallback | An optional callback routine executed when the item is rejected. |
Success / Failure