Регистр файлов
This commit is contained in:
parent
4fd0187ea6
commit
c8958cbee0
83 changed files with 25 additions and 53 deletions
40
src/View/Composite.php
Normal file
40
src/View/Composite.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue