Пример #1
0
 /**
  * @param $template
  * @return \SimpleXMLElement
  */
 public function getTemplateXmlObject($template)
 {
     $template = $this->getTemplatePath() . DIRECTORY_SEPARATOR . $template;
     $templateContent = file_get_contents($template);
     $blocks = $this->blockParser->getAllBlocks($templateContent);
     foreach ($blocks as $block) {
         $obj = $this->blockParser->getXmlObjectFromString($block);
         if ($this->blockParser->getXmlAttr($obj, 'type') === 'config') {
             return $obj;
         }
     }
 }