Синхронизировал частично с CMS2

This commit is contained in:
origami11 2017-02-09 17:14:11 +03:00
parent 6b412f5d6f
commit f2938b1353
30 changed files with 1447 additions and 1099 deletions

40
src/view/composite.php Normal file
View file

@ -0,0 +1,40 @@
<?php
// CompositeView+PHPTAL
class View_Composite extends View_Top
{
private $tal;
function __construct($file)
{
parent::__construct($file);
$this->tal = new PHPTAL($file);
$this->tal->stripComments(true);
}
function set($key, $val)
{
if ($key == 'title') {
$this->setTitle($val);
}
$this->tal->set($key, $val);
}
function __set($key, $val)
{
$this->tal->set($key, $val);
}
function setTranslator($tr)
{
$this->tal->setTranslator($tr);
}
function execute()
{
parent::execute();
// postProcess
return $this->tal->execute();
}
}