php - Use Loader class within a hook in CodeIgniter -


i have function in hook:

public function checkiflogged() {     $this->ci = & get_instance();     if(!$this->ci->session->userdata('logged') ){         $this->ci->load->view('common/home');         exit;     } } 

my problem $this->ci->load->view('common/home'); doesn't load template file @ all. there resons why?

i using post_controller_constructor hook.

thanks, peter

pre_system

called during system execution. benchmark , hooks class have been loaded @ point. no routing or other processes have happened.

pre_controller

called prior of controllers being called. base classes, routing, , security checks have been done.

post_controller_constructor

called after controller instantiated, prior method calls happening.

post_controller

called after controller executed.

display_override

overrides _display() function, used send finalized page web browser @ end of system execution. permits use own display methodology. note need reference ci superobject $this->ci =& get_instance() , finalized data available calling $this->ci->output->get_output()

cache_override

enables call own function instead of _display_cache() function in output class. permits use own cache display mechanism.

post_system

called after final rendered page sent browser, @ end of system execution after finalized data sent browser.

so

i think 1 looking display_override

but can take here does codeigniter have load view in final step?


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -