__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.
Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }