Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }