|
| createItem ($workflow, $id, $data=null, $status='start') |
| Create a new workflow item. More...
|
|
| loadItem ($id) |
| Load an existing workflow item. More...
|
|
| lockItem ($id) |
| Request a lock on a workflow item. More...
|
|
| unlockItem ($id) |
| Release a lock on a workflow item. More...
|
|
| getItemData ($id) |
| Get all data for an item. More...
|
|
| setItemData ($id, $data) |
| Set (add) data for an item. More...
|
|
| getItemStatus ($id) |
| Get current status for an item. More...
|
|
| setItemStatus ($id, $status, $remarks=null) |
| Set the status for an item. More...
|
|
| getItemStatuses ($id) |
| Get all possible (authorized) change statuses from the current status. More...
|
|
| push ($id, $data=null) |
| Push an item into the queue (reschedule to execute as soon as possible). More...
|
|
| execute ($timeout=null) |
| Process the queue. More...
|
|
| __construct ($fred, $config=null) |
|
| __destruct () |
|
| clientConfig () |
| Public configuration. More...
|
|
| config ($key, $default=null) |
| Retrieve a config value. More...
|
|
| ping () |
| Ping function. More...
|
|
| filemtime ($filename) |
| Filemtime with session cache. More...
|
|
| component ($name) |
| Get a component (local or default). More...
|
|
| components (... $names) |
| Get multiple components in an array. More...
|
|
| propertyExists ($property) |
| Check if a property exists (public or published). More...
|
|
| constants ($prefix=null) |
| Return all constants. More...
|
|
| get ($key) |
| Get one or more properties. More...
|
|
| set ($key, $value=null) |
| Set one or more properties. More...
|
|
| __get ($key) |
|
| __set ($key, $value) |
|
Definition at line 5 of file Workflow.php.
◆ createItem()
createItem |
( |
|
$workflow, |
|
|
|
$id, |
|
|
|
$data = null , |
|
|
|
$status = 'start' |
|
) |
| |
Create a new workflow item.
- Parameters
-
string | $workflow | Workflow for this item. |
string | $id | Unique ID for this item. |
array | $data | Data for this item. |
string | $status | Initial status for this item. |
- Returns
- Rsi\Ginger\Workflow\Item Item or false when not authorized.
Definition at line 28 of file Workflow.php.
◆ execute()
execute |
( |
|
$timeout = null | ) |
|
Process the queue.
- Parameters
-
int | $timeout | Maximum execution time (seconds). |
Definition at line 121 of file Workflow.php.
◆ getItemData()
Get all data for an item.
- Parameters
-
- Returns
- array
Definition at line 60 of file Workflow.php.
◆ getItemStatus()
Get current status for an item.
- Parameters
-
- Returns
- string
Definition at line 75 of file Workflow.php.
◆ getItemStatuses()
Get all possible (authorized) change statuses from the current status.
- Parameters
-
- Returns
- array Key = status ID, value = status data (array).
Definition at line 93 of file Workflow.php.
◆ getWorkflows()
◆ loadItem()
Load an existing workflow item.
- Parameters
-
- Returns
- Rsi\Ginger\Workflow\Item Item or false when not found or not authorized.
Definition at line 36 of file Workflow.php.
◆ lockItem()
Request a lock on a workflow item.
- Parameters
-
- Returns
- bool True on success.
Definition at line 44 of file Workflow.php.
◆ pause()
Pause an item (remove from queue).
- Parameters
-
Definition at line 107 of file Workflow.php.
◆ push()
push |
( |
|
$id, |
|
|
|
$data = null |
|
) |
| |
Push an item into the queue (reschedule to execute as soon as possible).
- Parameters
-
string | $id | Item ID. |
array | $data | Data to add to the item. |
Definition at line 101 of file Workflow.php.
◆ setItemData()
setItemData |
( |
|
$id, |
|
|
|
$data |
|
) |
| |
Set (add) data for an item.
- Parameters
-
string | $id | Item ID. |
array | $data | |
Definition at line 68 of file Workflow.php.
◆ setItemStatus()
setItemStatus |
( |
|
$id, |
|
|
|
$status, |
|
|
|
$remarks = null |
|
) |
| |
Set the status for an item.
- Parameters
-
string | $id | Item ID. |
string | $status | New status. |
string | $remarks | |
- Returns
- bool True when successful, false when not possible or not authorized.
Definition at line 85 of file Workflow.php.
◆ shift()
Shift the first item from the queue.
- Parameters
-
bool | $lock | Lock the item (or skip if not lockable). |
- Returns
- string ID or empty when the queue is empty.
Definition at line 114 of file Workflow.php.
◆ unlockItem()
Release a lock on a workflow item.
- Parameters
-
- Returns
- bool True on success.
Definition at line 52 of file Workflow.php.
◆ workflow()
Get workflow data.
- Parameters
-
- Returns
- array
Definition at line 16 of file Workflow.php.
◆ $_lockItem
◆ $_workflows
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Workflow.php