Exemple #1
0
 protected function loadConnector(\SimpleXMLElement $connector, $parentConnector = null)
 {
     if ($connector->getName() == 'Condition') {
         return new Condition($this, $parentConnector, (string) $connector['operand'], (string) $connector['operator'], (string) $connector['expression']);
     }
     $connectorObj = new Connector($this, (string) $connector['type']);
     foreach ($connector->children() as $child) {
         $connectorObj->addCondition($this->loadConnector($child, $connectorObj));
     }
     return $connectorObj;
 }