Path

ez components / documentation / api reference / trunk / workflowdatabasetiein


eZ Components trunk

WorkflowDatabaseTiein: ezcWorkflowDatabaseDefinitionStorage

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcWorkflowDatabaseDefinitionStorage

Workflow definition storage handler that saves and loads workflow definitions to and from a database. [source]

Implemented Interfaces

Member Variables

protected ezcDbHandler $db
ezcDbHandler instance to be used.
protected array(string=>mixed) $properties = array(
'options' => null
)

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  

Throws

ClassDescription
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  

Throws

ClassDescription
ezcDbException
ezcWorkflowDefinitionStorageException

loadByName

ezcWorkflow loadByName( string $workflowName, [int $workflowVersion = 0] )
Load a workflow definition by name.

Parameters

Name Type Description
$workflowName string  
$workflowVersion int  

Throws

ClassDescription
ezcDbException
ezcWorkflowDefinitionStorageException

save

void save( $workflow )
Save a workflow definition to the database.

Parameters

Name Type Description
$workflow ezcWorkflow  

Throws

ClassDescription
ezcDbException
ezcWorkflowDefinitionStorageException

Last updated: Mon, 21 Dec 2009