Zeta Components Manual :: Docs For Class ezcWorkflowDatabaseDefinitionStorage
WorkflowDatabaseTiein::ezcWorkflowDatabaseDefinitionStorage
Class ezcWorkflowDatabaseDefinitionStorage
Workflow definition storage handler that saves and loads workflow definitions to and from a database.
Source for this file: /WorkflowDatabaseTiein/src/definition_storage.php
Implements interfaces:
Version: | //autogen// |
Member Variables
protected ezcDbHandler |
$db
ezcDbHandler instance to be used. |
protected array(string=>mixed) |
$properties
= array(
Container to hold the properties |
Method Summary
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. |
Methods
__construct
ezcWorkflowDatabaseDefinitionStorage
__construct(
$db
)
Construct a new database definition handler.
This constructor is a tie-in.
Parameters:
Name | Type | Description |
---|---|---|
$db |
ezcDbHandler |
getCurrentVersionNumber
int
getCurrentVersionNumber(
string
$workflowName
)
Returns the current version number for a given workflow name.
Parameters:
Name | Type | Description |
---|---|---|
$workflowName |
string |
Exceptions:
Type | Description |
---|---|
ezcDbException |
loadById
ezcWorkflow
loadById(
int
$workflowId
, [string
$workflowName
= ''] , [int
$workflowVersion
= 0] )
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.
Parameters:
Name | Type | Description |
---|---|---|
$workflowId |
int | |
$workflowName |
string | |
$workflowVersion |
int |
Exceptions:
Type | Description |
---|---|
ezcDbException |
|
ezcWorkflowDefinitionStorageException |
loadByName
ezcWorkflow
loadByName(
string
$workflowName
, [int
$workflowVersion
= 0] )
Load a workflow definition by name.
Parameters:
Name | Type | Description |
---|---|---|
$workflowName |
string | |
$workflowVersion |
int |
Exceptions:
Type | Description |
---|---|
ezcDbException |
|
ezcWorkflowDefinitionStorageException |
save
void
save(
$workflow
)
Save a workflow definition to the database.
Parameters:
Name | Type | Description |
---|---|---|
$workflow |
ezcWorkflow |
Exceptions:
Type | Description |
---|---|
ezcDbException |
|
ezcWorkflowDefinitionStorageException |
Documentation generated by phpDocumentor 1.4.3