__construct() публичный Метод

The configuration is a structured (hash) array. Implementations must pass their complete configuration on to this object. We have chosen to use structured arrays for the configuration since it simplifies the process of creating new node types and storing workflows.
public __construct ( mixed $configuration = null )
$configuration mixed
Пример #1
0
 /**
  * Constructs a new variable set node with the configuration $configuration.
  *
  * The configuration is an array of keys and values of the format:
  * array( 'workflow variable name' => value )
  *
  * @param mixed $configuration
  * @throws ezcBaseValueException
  */
 public function __construct($configuration = '')
 {
     if (!is_array($configuration)) {
         throw new ezcBaseValueException('configuration', $configuration, 'array');
     }
     parent::__construct($configuration);
 }
Пример #2
0
 /**
  * Constructs a new sub workflow with the configuration $configuration.
  *
  * Configuration format
  * <ul>
  * <li>
  *   <b>String:</b>
  *   The name of the workflow to execute. The workflow is loaded using the
  *   loadByName method on the execution engine.
  * </li>
  *
  * <li>
  *   <b>Array:</b>
  *   <ul>
  *     <li><i>workflow:</i> The name of the workflow to execute. The workflow
  *     is loaded using the loadByName method on the execution engine.</li>
  *     <li><i>variables:</i> An array with the information for mapping
  *     workflow variables between parent and child workflow execution.</li>
  *   </ul>
  * <li>
  * </ul>
  *
  * @param mixed $configuration
  */
 public function __construct($configuration)
 {
     if (is_string($configuration)) {
         $configuration = array('workflow' => $configuration);
     }
     if (!isset($configuration['variables'])) {
         $configuration['variables'] = array('in' => array(), 'out' => array());
     }
     parent::__construct($configuration);
 }
Пример #3
0
 /**
  * Constructs a new action node with the configuration $configuration.
  *
  * Configuration format
  * <ul>
  * <li>
  *   <b>String:</b>
  *   The class name of the service object. Must implement ezcWorkflowServiceObject. No
  *   arguments are passed to the constructor.
  * </li>
  *
  * <li>
  *   <b>Array:</b>
  *   <ul>
  *     <li><i>class:</i> The class name of the service object. Must implement ezcWorkflowServiceObject.</li>
  *     <li><i>arguments:</i> Array of values that are passed to the constructor of the service object.</li>
  *   </ul>
  * <li>
  * </ul>
  *
  * @param mixed $configuration
  * @throws ezcWorkflowDefinitionStorageException
  */
 public function __construct($configuration)
 {
     if (is_string($configuration)) {
         $configuration = array('class' => $configuration);
     }
     if (!isset($configuration['arguments'])) {
         $configuration['arguments'] = array();
     }
     parent::__construct($configuration);
 }
Пример #4
0
 /**
  * Constructs a new input node.
  *
  * An input node accepts an array of workflow variables to accept
  * and/or together with a condition on the variable if required.
  *
  * Each element in the configuration array must be either
  * <b>String:</b> The name of the workflow variable to require. No conditions.
  *
  * or
  * <ul>
  *   <li><i>Key:</i> The name of the workflow variable to require.</li>
  *   <li><i>Value:</i> An object of type ezcWorkflowCondition</li>
  *
  * </ul>
  *
  * @param mixed $configuration
  * @throws ezcBaseValueException
  */
 public function __construct($configuration = '')
 {
     if (!is_array($configuration)) {
         throw new ezcBaseValueException('configuration', $configuration, 'array');
     }
     $tmp = array();
     foreach ($configuration as $key => $value) {
         if (is_int($key)) {
             if (!is_string($value)) {
                 throw new ezcBaseValueException('workflow variable name', $value, 'string');
             }
             $variable = $value;
             $condition = new ezcWorkflowConditionIsAnything();
         } else {
             if (!is_object($value) || !$value instanceof ezcWorkflowCondition) {
                 throw new ezcBaseValueException('workflow variable condition', $value, 'ezcWorkflowCondition');
             }
             $variable = $key;
             $condition = $value;
         }
         $tmp[$variable] = $condition;
     }
     parent::__construct($tmp);
 }
Пример #5
0
 /**
  * Constructs a new action node with the configuration $configuration.
  *
  * Configuration format
  * <ul>
  * <li><b>String:</b> The name of the workflow variable to operate on.</li>
  *
  * <li><b>Array:</b>
  *   <ul>
  *     <li><i>name:</i>  The name of the workflow variable to operate on.</li>
  *     <li><i>operand:</i> Name of workflow variable or a numerical value.
  *           Not used by implementations without an operand.</li>
  *    </ul>
  *  </li>
  *  </ul>
  *
  * @param mixed $configuration
  * @throws ezcWorkflowDefinitionStorageException
  */
 public function __construct($configuration)
 {
     parent::__construct($configuration);
 }