ExternalHandlerJob
extends Job
in package
A type of job that calls an external function for processing. i.e: a UDT or a static function.
If a module is specified for this object, then the module will be loaded before calling the handler.
Tags
Table of Contents
Properties
- $created : int
- $errors : int
- $function : string
- $id : int
- $is_udt : bool
- $module : string
- $name : string
- $start : int
Methods
- __construct() : mixed
- Constructor.
- delete() : mixed
- Delete this job from the database.
- execute() : mixed
- Abstract function to execute the job.
- save() : mixed
- Save this job to the database.
Properties
$created read-only
public
int
$created
The unix timestamp that this job was first created.
$errors read-only
public
int
$errors
The number of errors encountered while trying to pricess this job.
$function
public
string
$function
The callback function name.
$id read-only
public
int
$id
A unique integer id for this job (generated on save).
$is_udt
public
bool
$is_udt
Indicates that the function is a UDT name.
$module
public
string
$module
The module that created this job. Useful if the job ever needs to be deleted.
$name
public
string
$name
The name of this job. If not specified a unique random name will be generated.
$start
public
int
$start
The minimum time that this job should start at.
Methods
__construct()
Constructor.
public
__construct() : mixed
delete()
Delete this job from the database.
public
delete() : mixed
This method will throw exceptions if the job manager module is not available, or if for some reason the job could not be removed.
execute()
Abstract function to execute the job.
public
abstract execute() : mixed
Note: all jobs should be able to execute properly within one HTTP request. Jobs cannot count on administrator or data stored in session variables. Any data that is needed for the job to process should either be stored with the job object, or stored in the database in a user-independant format.
save()
Save this job to the database.
public
save() : mixed
This method will throw exceptions if the job manager module is not available, or if for some reason the job could not be saved.