Esempio n. 1
0
 /**
  * Processes child elements
  *
  * @param DOMElement $element
  * @return void
  */
 protected function process(DOMElement $element)
 {
     if ($element->hasChildNodes()) {
         foreach ($element->childNodes as $node) {
             $this->compiler->process($node);
         }
     }
 }
 protected function writeTemplateHeader()
 {
     parent::writeTemplateHeader(array('Framework Version' => Loader::$FrameworkVersion));
     $this->write('<?php $site = Site::Site(); ?>');
     $tsys = Site::getModule('TemplateSystem');
     if ($tsys->hasModule('PageSystem')) {
         $this->write('<?php ' . "if (isset(\$this->page)) {\n" . "  \$page = \$this->page;\n" . "} else {\n" . "  \$page = \$site->modules->get('PageSystem')->getCurrentPage();\n" . "}\n" . ' ?>');
     }
     $this->write("<?php \$params = " . __CLASS__ . "::getParamsProxy(); ?>");
 }
Esempio n. 3
0
 public function __construct(PHPSTLCompiler $compiler, $mess)
 {
     $template = $compiler->currentTemplate();
     $mess .= ", in {$template}";
     $pos = $compiler->currentPosition();
     if (isset($pos)) {
         $mess .= " at {$pos}";
     }
     parent::__construct($mess);
 }