public function addStep(Ezer_Step &$step) { // overwrite any flow definition $step->in_flows = array(); $step->out_flows = array(); $sources = $step->getSources(); if ($sources && is_array($sources) && count($sources)) { foreach ($sources as $source) { $source_name = $source->getStepName(); $source_step =& $this->getStep($source_name); if ($source_step) { $source_step->setOutFlow($step); $step->setInFlow($source_step); } } } $targets = $step->getTargets(); if ($targets && is_array($targets) && count($targets)) { foreach ($targets as $target) { $target_name = $target->getStepName(); $target_step =& $this->getStep($target_name); if ($target_step) { $target_step->setInFlow($step); $step->setOutFlow($target_step); } } } parent::addStep($step); }
public function add(Ezer_Step &$step) { // overwrite any flow definition $step->in_flows = array(); $step->out_flows = array(); $sources = $step->getSources(); if ($sources && $sources instanceof Ezer_Array) { $arr_sources = (array) $sources; foreach ($arr_sources as $source) { $source_name = $source->getStepName(); $source_step =& $this->getStep($source_name); if ($source_step) { $source_step->setOutFlow($step); $step->setInFlow($source_step); } } } $targets = $step->getTargets(); if ($targets && $targets instanceof Ezer_Array) { $arr_targets = (array) $targets; foreach ($arr_targets as $target) { $target_name = $target->getStepName(); $target_step =& $this->getStep($target_name); if ($target_step) { $target_step->setInFlow($step); $step->setOutFlow($target_step); } } } parent::add($step); }
public function addStep(Ezer_Step $step) { // overwrite any flow definition $step->in_flows = array(); $step->out_flows = array(); if (count($this->steps)) { throw new Ezer_SyntaxException('If object can contain only one step [' . $step->getName() . ']'); } parent::addStep($step); }
public function __construct(Ezer_StepContainerInstance &$scope_instance, Ezer_Step $step) { $this->max_retries = $step->getMaxRetries(); $this->attempts = 0; $this->step = $step; $this->scope_instance =& $scope_instance; if ($this !== $scope_instance) { $this->scope_instance->step_instances[] =& $this; } $this->setStatus(Ezer_StepInstanceStatus::LOADED); }
public static function parseSources(Ezer_Step $step, DOMElement $element) { for ($i = 0; $i < $element->childNodes->length; $i++) { $childElement = $element->childNodes->item($i); if ($childElement->parentNode !== $element) { continue; } if ($childElement instanceof DOMComment || $childElement instanceof DOMText) { continue; } $step->addSource(new Ezer_XmlLink($childElement)); } }
public function getPriority() { if (!$this->step) { return 0; } return min(1, max(10, $this->step->getPriority())); }
public function __set($name, $value) { if ($value instanceof Ezer_Step) { $this->add($value); } else { parent::__set($name, $value); } }
public function __set($name, $value) { if ($name == 'args' && !$value instanceof Ezer_Array) { $arr = new Ezer_Array(); $arr->add($value); $value = $arr; } parent::__set($name, $value); }
public function __construct($id) { parent::__construct($id); $this->args = array(); }