\ChronosScheduledAction
Simple value object class.
Synopsis
class ChronosScheduledAction
{
- // members
- public String $timeSpecification;
- public String $identifier;
- public String $actionType;
- public String $url;
- public String $method;
- public Object $parameters;
- public String $objectClass;
- public $objectID;
- // methods
- public void __construct()
- public void serialise()
- public void validate()
- public void validateTimeSpecification()
- public void validateAction()
- public static void _escape()
- public static void json_encode_typed()
- public static void json_decode_typed()
- public static void json_decode_typed_normalise()
- public map summary()
Members
public
- $actionType
—
String
Specifies the way the action is executed. "url" indicates that the action is invoked by visiting a given URL. "method" indicates that either a static or instance method is called. - $identifier
—
String
Scheduled events can be have an identifier which so they can be removed or replaced. The identifier doesn't need to be unique; if it is not unique, then all actions with the same group can be replaced or removed together. - $method
—
String
If ActionType=Method, this is the name of the method. If it is of the form X::y, it is a static call of method y on class x. Otherwise it is an instance method, and ObjectClass and ObjectID identify the instance. - $objectClass
—
String
If actionType=method and the method is not a static method, $objectClass identifies the class of the instance to execute the method on (must be a DataObject derivative) - $objectID
—
int
If actionType=method and the method is not a static method, $objectID identifies the ID of the instance. - $parameters
—
Object
If not null, this is a serialised PHP object that represents parameters that can be passed to the method. - $timeSpecification
—
String
A specification of when this action should execute. Can be an explicit date/time for a one-off execution. - $url
—
String
If actionType=url, this is the URL to hit.
Methods
public
- __construct()
- _escape()
- json_decode_typed()
- json_decode_typed_normalise()
- json_encode_typed()
- serialise() — Return a string representation of the scheduled action for writing to the config files that the executor uses.
- summary() — Generate a presentable summary of the action.
- validate() — Validate an action. Throws an exception if there is a problem, otherwise returns true.
- validateAction()
- validateTimeSpecification()