CI_Profiler::_compile_view_data PHP Method

_compile_view_data() public method

Allows any data passed to views to be available in the profiler bar.
public _compile_view_data ( ) : array
return array
    public function _compile_view_data()
    {
        $output = array();
        foreach ($this->_ci_cached_vars as $key => $val) {
            if (is_numeric($key)) {
                $output[$key] = "'{$val}'";
            }
            if (is_array($val) || is_object($val)) {
                $output[$key] = '<pre>' . htmlspecialchars(stripslashes(print_r($val, true))) . '</pre>';
            } else {
                $output[$key] = htmlspecialchars(stripslashes($val));
            }
        }
        return $output;
    }