/** * Turns your class into a controller to allow it call views and perform other controller functions * @param $controller_name string the name of the controller */ function __construct($controller_name) { parent::__construct(); $this->ini($controller_name); $this->session = new session('_k&a', false); $this->view = new View(); $this->upload = new upload_engine(); $this->model = !empty($controller_name) ? $this->load_model($controller_name) : null; }
function __construct($id) { parent::__construct(dirname(__FILE__), $id); //Construct }
/** * Provides access to views */ function __construct() { parent::__construct(); }