ezcWorkflowExecution::__set PHP Method

__set() public method

Property write access.
public __set ( string $propertyName, mixed $val )
$propertyName string Name of the property.
$val mixed The value for the property.
    public function __set($propertyName, $val)
    {
        switch ($propertyName) {
            case 'definitionStorage':
                if (!$val instanceof ezcWorkflowDefinitionStorage) {
                    throw new ezcBaseValueException($propertyName, $val, 'ezcWorkflowDefinitionStorage');
                }
                $this->properties['definitionStorage'] = $val;
                return;
            case 'workflow':
                if (!$val instanceof ezcWorkflow) {
                    throw new ezcBaseValueException($propertyName, $val, 'ezcWorkflow');
                }
                $this->properties['workflow'] = $val;
                return;
        }
        throw new ezcBasePropertyNotFoundException($propertyName);
    }

Usage Example

 /**
  * Property write access.
  *
  * @param string $propertyName Name of the property.
  * @param mixed $val  The value for the property.
  *
  * @throws ezcBaseValueException
  *         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
  *         ezcWorkflow.
  * @ignore
  */
 public function __set($propertyName, $val)
 {
     if ($val instanceof ezcWorkflow && ($val->isInteractive() || $val->hasSubWorkflows())) {
         throw new ezcWorkflowExecutionException('This executer can only execute workflows that have no Input and SubWorkflow nodes.');
     }
     return parent::__set($propertyName, $val);
 }
All Usage Examples Of ezcWorkflowExecution::__set