spoof
 All Data Structures Namespaces Files Functions Variables Pages
StorageDB Class Reference
Inheritance diagram for StorageDB:
Collaboration diagram for StorageDB:

Public Member Functions

 __construct (\lib360\db\data\ITable $workflow,\lib360\db\data\ITable $workflowDefinition,\lib360\db\data\ITable $workflowLog)
 getWorkflow ($name)
 getDefinition ($name)
 log ($date, $entity_id, $workflow_name, $state_before, $function, $result, $state_after)

Protected Attributes

 $storageWorkflow
 $storageWorkflowDefinition
 $storageWorkflowLog
 $storage = array()
 $fieldWorkflowName = 'name'
 $fieldWorkflowType = 'type'
 $fieldWorkflowDefinitionName = 'workflow_name'
 $fieldWorkflowDefinitionState = 'state'
 $fieldWorkflowDefinitionFunction = 'operation'
 $fieldWorkflowDefinitionResult = 'result'
 $fieldWorkflowDefinitionNextState = 'next_state'
 $fieldWorkflowLogDateCreated = 'date_created'
 $fieldWorkflowLogEntityID = 'entity_id'
 $fieldWorkflowLogName = 'workflow_name'
 $fieldWorkflowLogStateBefore = 'state_before'
 $fieldWorkflowLogOperation = 'operation'
 $fieldWorkflowLogResult = 'result'
 $fieldWorkflowLogStateAfter = 'state_after'

Constructor & Destructor Documentation

__construct ( \lib360\db\data\ITable  $workflow,
\lib360\db\data\ITable  $workflowDefinition,
\lib360\db\data\ITable  $workflowLog 
)

Constructor

Sets given table objects to internal properties.

Parameters:
\lib360\db\data\ITable$workflow
\lib360\db\data\ITable$workflowDefinition
\lib360\db\data\ITable$workflowLog

Implements IStorageDB.


Member Function Documentation

getDefinition (   $name)

Get state workflow definition object

Queries table to retrieve state workflow definition, instantiates the state workflow definition object and returns it.

Implements IStorage.

getWorkflow (   $name)

Get data record of workflow by name

Queries table and returns record list data for given workflow.

Parameters:
string$nameworkflow name to retrieve
Returns:
result of the query
log (   $date,
  $entity_id,
  $workflow_name,
  $state_before,
  $function,
  $result,
  $state_after 
)

Field Documentation

$fieldWorkflowDefinitionFunction = 'operation'
protected
$fieldWorkflowDefinitionName = 'workflow_name'
protected
$fieldWorkflowDefinitionNextState = 'next_state'
protected
$fieldWorkflowDefinitionResult = 'result'
protected
$fieldWorkflowDefinitionState = 'state'
protected
$fieldWorkflowLogDateCreated = 'date_created'
protected
$fieldWorkflowLogEntityID = 'entity_id'
protected
$fieldWorkflowLogName = 'workflow_name'
protected
$fieldWorkflowLogOperation = 'operation'
protected
$fieldWorkflowLogResult = 'result'
protected
$fieldWorkflowLogStateAfter = 'state_after'
protected
$fieldWorkflowLogStateBefore = 'state_before'
protected
$fieldWorkflowName = 'name'
protected
$fieldWorkflowType = 'type'
protected
$storage = array()
protected

NOTE: review these - most of these should go into one of the above encapsulated storage classes

$storageWorkflow
protected
$storageWorkflowDefinition
protected
$storageWorkflowLog
protected

The documentation for this class was generated from the following file: