Example #1
0
 /**
  * Parses services from the given XML Data
  * 
  * @param \SimpleXMLElement $pXmlData
  */
 protected function parseServices(\SimpleXMLElement $pXmlData)
 {
     if (isset($pXmlData->service) === false) {
         return;
     }
     // get each service
     foreach ($pXmlData->service as $xml_service) {
         // create new service
         $definition = new Definition((string) $xml_service['class']);
         // set constructor call
         $definition->setConstructArguments($this->parseConstructorCall($xml_service));
         // set method calls
         $definition->setMethodCalls($this->parseMethodCalls($xml_service));
         // add definition to the container
         $this->container()->addDefinition((string) $xml_service['id'], $definition);
     }
 }