Workflow definition storage handler that saves and loads workflow definitions to and from a database.
Source for this file: /WorkflowDatabaseTiein/src/definition_storage.php
Version: | //autogen// |
protected ezcDbHandler |
$db
ezcDbHandler instance to be used. |
protected array(string=>mixed) |
$properties
= array(
Container to hold the properties |
public ezcWorkflowDatabaseDefinitionStorage |
__construct(
$db
)
Construct a new database definition handler. |
protected int |
getCurrentVersionNumber(
$workflowName
)
Returns the current version number for a given workflow name. |
public ezcWorkflow |
loadById(
$workflowId
, [ $workflowName
= ''] , [ $workflowVersion
= 0] )
Load a workflow definition by ID. |
public ezcWorkflow |
loadByName(
$workflowName
, [ $workflowVersion
= 0] )
Load a workflow definition by name. |
public void |
save(
$workflow
)
Save a workflow definition to the database. |
Construct a new database definition handler.
This constructor is a tie-in.
Name | Type | Description |
---|---|---|
$db |
ezcDbHandler |
Returns the current version number for a given workflow name.
Name | Type | Description |
---|---|---|
$workflowName |
string |
Type | Description |
---|---|
ezcDbException |
Load a workflow definition by ID.
Providing the name of the workflow that is to be loaded as the optional second parameter saves a database query.
Name | Type | Description |
---|---|---|
$workflowId |
int | |
$workflowName |
string | |
$workflowVersion |
int |
Type | Description |
---|---|
ezcDbException |
|
ezcWorkflowDefinitionStorageException |
Load a workflow definition by name.
Name | Type | Description |
---|---|---|
$workflowName |
string | |
$workflowVersion |
int |
Type | Description |
---|---|
ezcDbException |
|
ezcWorkflowDefinitionStorageException |
Save a workflow definition to the database.
Name | Type | Description |
---|---|---|
$workflow |
ezcWorkflow |
Type | Description |
---|---|
ezcDbException |
|
ezcWorkflowDefinitionStorageException |