public function applyTo(BusinessProcess $bp) { $node = $bp->getNode($this->getNodeName()); foreach ($this->properties as $key => $val) { $func = 'set' . ucfirst($key); $node->{$func}($val); } return $this; }
public function applyTo(BusinessProcess $bp) { $node = new BpNode($bp, (object) array('name' => $this->getNodeName(), 'operator' => $this->properties->operator, 'child_names' => $this->properties->childNames)); foreach ($this->properties as $key => $val) { $func = 'set' . ucfirst($key); $node->{$func}($val); } $bp->addNode($this->getNodeName(), $node); if ($this->hasParent()) { $node->addParent($bp->getNode($this->getParentName())); } return $node; }