Файл: plugins/payment/classes/Payment_Template.php
Строк: 19
<?php
class Payment_Template
{
protected $vars = array();
public $tpl_patch = 'tpl/';
public function __construct() {
}
public function assign($varname, $value)
{
$this->vars[$varname] = $value;
return true;
}
/*
* Генерируем шаблон
*/
public function getTemplate($tpl_file)
{
// Помещаем переменные в форму
extract($this->vars);
if (is_file(TPL . $this->tpl_patch . $tpl_file . '.tpl.php')) {
include TPL . $this->tpl_patch . $tpl_file . '.tpl.php';
} else {
return array('error' => __('Не удалось загрузить форму: ') . $tpl_file);
}
}
public function display($tpl_file = 'document')
{
return $this->getTemplate($tpl_file);
}
}