Welcome Guest, Not a member yet? Register   Sign In
post_controller_constructor hook not loading $this->session
#1

[eluser]Webnet[/eluser]
My problem is that I can't access $this->session within my Application controller. Is this functionality not available to the post_controller_constructor hook ?

hooks.php

Code:
$hook['post_controller_constructor'] = array(
    array(
        'class' => 'application',
        'function' => 'preController',
        'filename' => 'application.php',
        'filepath' => 'controllers'
    )
);

application.php

Code:
class Application extends Controller {
    /*
     * The application controls logic which is global to the entire application and not on any specific page.
     */
    public function __construct() {
        parent::Controller();
        
        $this->load->library('session');
        print_r($this->session);
        exit;
    }
}


Messages In This Thread
post_controller_constructor hook not loading $this->session - by El Forum - 03-14-2011, 10:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB