public function result($xmlData, $intLevel = 0) { $xlyTemplate = new Dict(); if ($this->hasDataset('frame')) { $strTemplate = $this->hasDataset('frame'); } elseif ($this->hasAttribute('file') && is_readable($this->attribute('file'))) { $strTemplate = $this->fileRead($this->attribute('file')); } else { throw new beanException('No Template specified for view:frame'); } $arrSection = $this->children('section'); foreach ($arrSection as $section) { if ($section->hasAttribute('name')) { $xlyTemplate->set($section->attribute('name'), $section->dump()); } } // Insert the blocks into the template and return the result return $xlyTemplate->insertInto($strTemplate); }