예제 #1
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  * Also will set the values in the parameters array as properties of this object
  *
  * @access	public
  * @param	array	Config preferences
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     $_fuel_config = array('compile_dir', 'delimiters', 'allowed_functions', 'refs');
     foreach ($_fuel_config as $p) {
         $config = $this->fuel->config('parser_' . $p);
         if (!is_null($config)) {
             $this->{$p} = $config;
         }
     }
     $this->set_engine($this->fuel->config('parser_engine'));
     $this->create_compile_dir();
     return $this;
 }
예제 #2
0
 /**
  * Initialize preferences
  *
  * @access	public
  * @param	array
  * @return	void
  */
 public function initialize($config = array())
 {
     parent::initialize($config);
     // Get the twig instance.
     $this->engine = $this->spawn();
 }