示例#1
0
文件: Simulator.php 项目: eureka2/g6k
 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;
 }