Author: sb
Date: Wed May 30 16:31:47 2007
New Revision: 5313
Log:
- definitionHandler -> definitionStorage
Modified:
trunk/Workflow/src/definitions/xml.php
trunk/Workflow/src/execution/non_interactive.php
trunk/Workflow/src/interfaces/execution.php
trunk/Workflow/src/nodes/sub_workflow.php
trunk/Workflow/src/workflow.php
trunk/Workflow/tests/execution.php
trunk/Workflow/tests/execution_test.php
trunk/Workflow/tests/workflow_test.php
trunk/WorkflowDatabaseTiein/src/definition_storage.php
trunk/WorkflowDatabaseTiein/src/execution.php
Modified: trunk/Workflow/src/definitions/xml.php
==============================================================================
--- trunk/Workflow/src/definitions/xml.php [iso-8859-1] (original)
+++ trunk/Workflow/src/definitions/xml.php [iso-8859-1] Wed May 30 16:31:47 2007
@@ -209,7 +209,7 @@
// Create workflow object and add the node objects to it.
$workflow = new ezcWorkflow( $workflowName, $startNode,
$defaultEndNode );
- $workflow->definitionHandler = $this;
+ $workflow->definitionStorage = $this;
$workflow->version = (int)$workflowVersion;
// Handle the variable handlers.
Modified: trunk/Workflow/src/execution/non_interactive.php
==============================================================================
--- trunk/Workflow/src/execution/non_interactive.php [iso-8859-1] (original)
+++ trunk/Workflow/src/execution/non_interactive.php [iso-8859-1] Wed May 30
16:31:47 2007
@@ -23,7 +23,7 @@
* @param mixed $val The value for the property.
*
* @throws ezcBaseValueException
- * If a the value for the property definitionHandler is not an
+ * If a the value for the property definitionStorage is not an
* instance of ezcWorkflowDefinitionStorage.
* @throws ezcBaseValueException
* If a the value for the property workflow is not an instance of
Modified: trunk/Workflow/src/interfaces/execution.php
==============================================================================
--- trunk/Workflow/src/interfaces/execution.php [iso-8859-1] (original)
+++ trunk/Workflow/src/interfaces/execution.php [iso-8859-1] Wed May 30
16:31:47 2007
@@ -11,7 +11,7 @@
/**
* Abstract base class for workflow execution engines.
*
- * @property ezcWorkflowDefinitonStorage $definitionHandler
+ * @property ezcWorkflowDefinitonStorage $definitionStorage
* The definition handler used to fetch subworkflows if needed.
* @property ezcWorkflow $workflow The workflow being executed.
*
@@ -28,7 +28,7 @@
* @var array(string=>mixed)
*/
protected $properties = array(
- 'definitionHandler' => null,
+ 'definitionStorage' => null,
'workflow' => null
);
@@ -120,7 +120,7 @@
{
switch ( $propertyName )
{
- case 'definitionHandler':
+ case 'definitionStorage':
case 'workflow':
return $this->properties[$propertyName];
}
@@ -135,7 +135,7 @@
* @param mixed $val The value for the property.
*
* @throws ezcBaseValueException
- * If a the value for the property definitionHandler is not an
+ * If a the value for the property definitionStorage is not an
* instance of ezcWorkflowDefinitionStorage.
* @throws ezcBaseValueException
* If a the value for the property workflow is not an instance of
@@ -146,13 +146,13 @@
{
switch ( $propertyName )
{
- case 'definitionHandler':
+ case 'definitionStorage':
if ( !( $val instanceof ezcWorkflowDefinitionStorage ) )
{
throw new ezcBaseValueException( $propertyName, $val,
'ezcWorkflowDefinitionStorage' );
}
- $this->properties['definitionHandler'] = $val;
+ $this->properties['definitionStorage'] = $val;
return;
@@ -181,7 +181,7 @@
{
switch ( $propertyName )
{
- case 'definitionHandler':
+ case 'definitionStorage':
case 'workflow':
return true;
}
Modified: trunk/Workflow/src/nodes/sub_workflow.php
==============================================================================
--- trunk/Workflow/src/nodes/sub_workflow.php [iso-8859-1] (original)
+++ trunk/Workflow/src/nodes/sub_workflow.php [iso-8859-1] Wed May 30 16:31:47
2007
@@ -38,14 +38,14 @@
*/
public function execute( ezcWorkflowExecution $execution )
{
- if ( $execution->definitionHandler === null )
+ if ( $execution->definitionStorage === null )
{
throw new ezcWorkflowExecutionException(
'No ezcWorkflowDefinitionStorage implementation available.'
);
}
- $workflow = $execution->definitionHandler->loadByName(
$this->configuration );
+ $workflow = $execution->definitionStorage->loadByName(
$this->configuration );
if ( !$workflow->isInteractive() && !$workflow->hasSubWorkflows() )
{
Modified: trunk/Workflow/src/workflow.php
==============================================================================
--- trunk/Workflow/src/workflow.php [iso-8859-1] (original)
+++ trunk/Workflow/src/workflow.php [iso-8859-1] Wed May 30 16:31:47 2007
@@ -11,7 +11,7 @@
/**
* Class representing a workflow.
*
- * @property ezcWorkflowDefinitonStorage $definitionHandler
+ * @property ezcWorkflowDefinitonStorage $definitionStorage
* The definition handler used to fetch sub workflows on demand.
* This property is set automatically if you load a workflow using
* a workflow definition storage.
@@ -37,7 +37,7 @@
* @var array(string=>mixed)
*/
protected $properties = array(
- 'definitionHandler' => null,
+ 'definitionStorage' => null,
'id' => false,
'name' => '',
'startNode' => null,
@@ -103,7 +103,7 @@
{
switch ( $propertyName )
{
- case 'definitionHandler':
+ case 'definitionStorage':
case 'id':
case 'name':
case 'startNode':
@@ -127,7 +127,7 @@
* @param mixed $val The value for the property.
*
* @throws ezcBaseValueException
- * If the value for the property definitionHandler is not an
+ * If the value for the property definitionStorage is not an
* instance of ezcWorkflowDefinitionStorage.
* @throws ezcBaseValueException
* If the value for the property id is not an integer.
@@ -147,13 +147,13 @@
{
switch ( $propertyName )
{
- case 'definitionHandler':
+ case 'definitionStorage':
if ( !( $val instanceof ezcWorkflowDefinitionStorage ) )
{
throw new ezcBaseValueException( $propertyName, $val,
'ezcWorkflowDefinitionStorage' );
}
- $this->properties['definitionHandler'] = $val;
+ $this->properties['definitionStorage'] = $val;
return;
@@ -209,7 +209,7 @@
{
switch ( $propertyName )
{
- case 'definitionHandler':
+ case 'definitionStorage':
case 'id':
case 'name':
case 'startNode':
Modified: trunk/Workflow/tests/execution.php
==============================================================================
--- trunk/Workflow/tests/execution.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/execution.php [iso-8859-1] Wed May 30 16:31:47 2007
@@ -51,7 +51,7 @@
* @param mixed $val The value for the property.
*
* @throws ezcBaseValueException
- * If a the value for the property definitionHandler is not an
+ * If a the value for the property definitionStorage is not an
* instance of ezcWorkflowDefinitionStorage.
* @throws ezcBaseValueException
* If a the value for the property workflow is not an instance of
Modified: trunk/Workflow/tests/execution_test.php
==============================================================================
--- trunk/Workflow/tests/execution_test.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/execution_test.php [iso-8859-1] Wed May 30 16:31:47
2007
@@ -27,7 +27,7 @@
{
parent::setUp();
$this->execution = new ezcWorkflowTestExecution;
- $this->execution->definitionHandler = $this->definition;
+ $this->execution->definitionStorage = $this->definition;
}
public function testInteractiveWorkflowRaisesException()
@@ -238,7 +238,7 @@
public function testNonInteractiveSubWorkflow()
{
$this->setUpWorkflowWithSubWorkflow( 'StartEnd' );
- $this->workflow->definitionHandler = $this->definition;
+ $this->workflow->definitionStorage = $this->definition;
$this->execution->workflow = $this->workflow;
$this->execution->start();
@@ -250,7 +250,7 @@
public function testInteractiveSubWorkflow()
{
$this->setUpWorkflowWithSubWorkflow( 'StartInputEnd' );
- $this->workflow->definitionHandler = $this->definition;
+ $this->workflow->definitionStorage = $this->definition;
$this->execution->workflow = $this->workflow;
$this->execution->setInputVariableForSubWorkflow( 'variable', 'value'
);
$this->execution->start();
@@ -304,7 +304,7 @@
{
$execution = new ezcWorkflowExecutionNonInteractive;
- $this->assertTrue( isset( $execution->definitionHandler ) );
+ $this->assertTrue( isset( $execution->definitionStorage ) );
$this->assertTrue( isset( $execution->workflow ) );
$this->assertFalse( isset( $execution->foo ) );
}
@@ -346,7 +346,7 @@
try
{
$execution = new ezcWorkflowExecutionNonInteractive;
- $execution->definitionHandler = new StdClass;
+ $execution->definitionStorage = new StdClass;
}
catch ( ezcBaseValueException $e )
{
Modified: trunk/Workflow/tests/workflow_test.php
==============================================================================
--- trunk/Workflow/tests/workflow_test.php [iso-8859-1] (original)
+++ trunk/Workflow/tests/workflow_test.php [iso-8859-1] Wed May 30 16:31:47 2007
@@ -43,10 +43,10 @@
public function testGetSetDefinition()
{
$this->setUpStartEnd();
- $this->assertNull( $this->workflow->definitionHandler );
-
- $this->workflow->definitionHandler = $this->definition;
- $this->assertNotNull( $this->workflow->definitionHandler );
+ $this->assertNull( $this->workflow->definitionStorage );
+
+ $this->workflow->definitionStorage = $this->definition;
+ $this->assertNotNull( $this->workflow->definitionStorage );
}
public function testGetSetName()
@@ -183,7 +183,7 @@
{
$this->setUpStartEnd();
- $this->assertTrue( isset( $this->workflow->definitionHandler ) );
+ $this->assertTrue( isset( $this->workflow->definitionStorage ) );
$this->assertTrue( isset( $this->workflow->id ) );
$this->assertTrue( isset( $this->workflow->name ) );
$this->assertTrue( isset( $this->workflow->nodes ) );
@@ -229,7 +229,7 @@
try
{
- $foo = $this->workflow->definitionHandler = null;
+ $foo = $this->workflow->definitionStorage = null;
}
catch ( ezcBaseValueException $e )
{
Modified: trunk/WorkflowDatabaseTiein/src/definition_storage.php
==============================================================================
--- trunk/WorkflowDatabaseTiein/src/definition_storage.php [iso-8859-1]
(original)
+++ trunk/WorkflowDatabaseTiein/src/definition_storage.php [iso-8859-1] Wed May
30 16:31:47 2007
@@ -153,7 +153,7 @@
// Create workflow object and add the node objects to it.
$workflow = new ezcWorkflow( $workflowName, $startNode,
$defaultEndNode );
- $workflow->definitionHandler = $this;
+ $workflow->definitionStorage = $this;
$workflow->id = (int)$workflowId;
$workflow->version = (int)$workflowVersion;
@@ -272,7 +272,7 @@
$statement = $query->prepare();
$statement->execute();
- $workflow->definitionHandler = $this;
+ $workflow->definitionStorage = $this;
$workflow->id = (int)$this->db->lastInsertId();
$workflow->version = (int)$workflowVersion;
Modified: trunk/WorkflowDatabaseTiein/src/execution.php
==============================================================================
--- trunk/WorkflowDatabaseTiein/src/execution.php [iso-8859-1] (original)
+++ trunk/WorkflowDatabaseTiein/src/execution.php [iso-8859-1] Wed May 30
16:31:47 2007
@@ -48,7 +48,7 @@
$this->loadExecution( $executionId );
}
- $this->properties['definitionHandler'] = new
ezcWorkflowDatabaseDefinitionStorage( $db );
+ $this->properties['definitionStorage'] = new
ezcWorkflowDatabaseDefinitionStorage( $db );
}
/**
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components