Created
April 21, 2011 18:54
-
-
Save aambrozkiewicz/935229 to your computer and use it in GitHub Desktop.
CodeIgniter MY_Loader, displays used template before actual output in HTML comment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Loader extends CI_Loader | |
{ | |
function view($view, $vars = array(), $return = FALSE) | |
{ | |
if ($return != TRUE) | |
echo "<!-- $view -->\n"; | |
return ($return == TRUE ? "<!-- $view -->\n" : '') . $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment