application/libraries/Twig.php
/**
     * Load the template and return the data
     *
     * @param mixed $template
     * @param mixed $data
     * @returns string
     *
     */
Load the template and return the data
@param mixed $template
@param mixed $data
@returns string
Load the template and return the data @param mixed $template @param mixed $data @returns string
public function parse($template, $data = array(), $return = FALSE) {
        if (stripos($template, '.') === FALSE) {
            $template . config_item('twig.extension');
        }
        $data = array_merge($this->_local_vars, $data);
        $template = $this->_twig->loadTemplate($template);
        if ($return === true) {
            return $template->render($data);
        } else {
            return $template->display($data);
        }
    }
public function parse ( $ template , $ data = array ( ) , $ return = FALSE ) { if ( stripos ( $ template , '.' ) === FALSE ) { $ template . config_item ( 'twig.extension' ) ; } $ data = array_merge ( $ this -> _local_vars , $ data ) ; $ template = $ this -> _twig -> loadTemplate ( $ template ) ; if ( $ return === true ) { return $ template -> render ( $ data ) ; } else { return $ template -> display ( $ data ) ; } }
Load the template and return the data
 @param mixed $template
 @param mixed $data
 @returns string
Load the template and return the data @param mixed $template @param mixed $data @returns string
// Merge supplied data with any local variables