Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello! I created my own class at folder applications/core and named it MY_Output.php
PHP
class MY_Output extends CI_Output {

    function set_status_header($code = 200, $text = '')
    {
        set_status_header($code, $text);
        $this->last_set_status_code = $code;
        return $this;
    }

    function get_status_header()
    {
        return $this->last_set_status_code;
    }

}


PHP
At folder controllers i created new controller Error.php:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Error extends MY_Output 
{
	public function __construct()
	{
		parent::__construct();
	}

	function error_404()
	{
		
			$this->load->view('404');
	}
}       

?>  


How i can get access (call) to functions of class MY_Output from class Error?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900