public function __construct($template = false) { $this->setTemplateRepository(self::$_template_dirs); if (DEBUG) { $this->setForceReparse(true); } parent::__construct($template); }
/** * DECTAL Constructor to set up template and inner template repos * * @param string|NULL If not NULL, this sets the inner template file * to the given filename. The template repo is set to the base template repo */ public function __construct($template = NULL) { parent::__construct(); $this->setTemplateRepository('templates/'); if ($template != NULL) { $this->_sub_template = new PHPTAL($template); } }
function __construct() { // Default-Werte setzen $this->setPageTitle(self::DEFAULT_PAGE_TITLE); $this->setTemplateFile(self::DEFAULT_TEMPLATE_FILE); $this->setTemplateMacro(self::DEFAULT_TEMPLATE_MACRO); // Template-Konstruktor aufrufen parent::__construct(); }
public function __construct($template = false) { parent::__construct($template); $this->setTemplateRepository(self::$_template_dirs); if (DEBUG) { $this->setForceReparse(true); } $this->static = new Template_StaticContext(); $this->global = new Template_GlobalContext(); }
/** * Constructor * @param string $tplName The name of the Template file (without .xml) * @throws \Exception */ public function __construct($tplName) { $this->templateFile = BUZZSEO_DIR . DIRECTORY_SEPARATOR . 'tal' . DIRECTORY_SEPARATOR . $tplName . '.xml'; if (!is_readable($this->templateFile)) { throw new \Exception(sprintf(__('File %s does not exist.', 'buzz-seo'), $this->templateFile), 404); } // Construct PHPTAL object parent::__construct(); // Add translator $this->TalTranslator = new Services\Translation(); $this->TalTranslator->useDomain('buzz-seo'); $this->setTranslator($this->TalTranslator); // Render as HTML5 $this->setOutputMode(\PHPTAL::HTML5); // Strip comments $this->stripComments(true); // Set source $this->setTemplate($this->templateFile); }
function __construct() { //Call PHPTAL constructor (because we can) parent::__construct(); /** * Use CI config to set encoding, templates and compiled templates path */ $CI =& get_instance(); //BUGGGGGG!!!! CI FORUM BUG, REMOVE the ; SYNTAX ERROR! /** * You can change paths if you need to */ $cache_path = $CI->config->item('cache_path'); if (empty($cache_path)) { $cache_path = APPPATH . 'cache/'; } $this->setEncoding($CI->config->item('charset')); $this->setTemplateRepository(APPPATH . 'views/'); $this->setPhpCodeDestination($cache_path); }