/** * 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); }
/** * Property set access. * * @param string $propertyName * @param string $propertyValue * @throws ezcBasePropertyNotFoundException * If the given property could not be found. * @throws ezcBaseValueException * If the value for the property options is not an ezcWorkflowDatabaseOptions object. * @ignore */ public function __set($propertyName, $propertyValue) { switch ($propertyName) { case 'definitionStorage': case 'workflow': return parent::__set($propertyName, $propertyValue); case 'options': if (!$propertyValue instanceof ezcWorkflowDatabaseOptions) { throw new ezcBaseValueException($propertyName, $propertyValue, 'ezcWorkflowDatabaseOptions'); } break; default: throw new ezcBasePropertyNotFoundException($propertyName); } $this->properties[$propertyName] = $propertyValue; }