Exemplo n.º 1
0
 protected function loadActionResultTypes($actionName, ResultTypeService $service)
 {
     if (!$this->descriptor instanceof Descriptor) {
         return;
     }
     $results = array();
     $map = $this->xmlActionResultsXmlMapFactory($actionName);
     foreach ($this->descriptor->getSourcesXml() as $xml) {
         $this->descriptor->set('packageDir', dirname($xml->getRealPath()));
         $parse = $map->execute($xml);
         $res = isset($parse['results']) ? $parse['results'] : array();
         $results = array_merge($results, $res);
     }
     foreach ($results as $result => $data) {
         $service->register($actionName, $result, $data['type'], $data['params']);
     }
     $this->descriptor->set('packageDir', null);
 }