File manager - Edit - /home/wwwroot/camplus.hk/master.camplus.hk/public_html/application/libraries/Twig.php
Back
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); /* * Created on 2013-10-25 by haojue * Twig CI Library * */ require_once APPPATH . 'third_party/Twig/Autoloader.php'; class Twig { private $loader ; private $twig; private $_ci; function __construct() { Twig_Autoloader::register(); $this->loader = new Twig_Loader_Filesystem(APPPATH.'views'); $this->twig = new Twig_Environment($this->loader, array( 'cache' => APPPATH.'cache', 'auto_reload' => true )); } public function render($tpl,$data,$return = FALSE) { $output = $this->twig->render($tpl,$data); $this->_ci =& get_instance(); $this->_ci->output->append_output($output); if ($return) { return $output; } } /** * __call * @param string $method * @param array $args * @throws Exception */ public function __call($method,$args) { $return = call_user_func_array(array($this->twig,$method),$args); if ($return) { return $return; } } }
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.18 |
proxy
|
phpinfo
|
Settings