public function init()
    {
        $this->initSession();
        $this->session = null === $_SESSION ? array() : $_SESSION;
        if (NULL === $this->getSessionKey('__FLASH_CLEAR__')) {
            $this->clearFlashes();
            $this->setSessionKey('__FLASH_CLEAR__', microtime(TRUE));
        }
        $this->user = array_key_exists(self::USER_ID_TOKEN, $this->session) ? unserialize($this->session[self::USER_ID_TOKEN]) : NULL;
        $this->admin = array_key_exists(self::ADMIN_ID_TOKEN, $this->session) ? unserialize($this->session[self::ADMIN_ID_TOKEN]) : NULL;
        if (null === $this->admin) {
            $this->checkAdmin();
        }
        $this->setLoaded(true);
    }
public function init()
    {
        $this->initSession();
        $this->session = null === $_SESSION ? array() : $_SESSION;
        if (NULL === $this->getSessionKey('__FLASH_CLEAR__')) {
            $this->clearFlashes();
            $this->setSessionKey('__FLASH_CLEAR__', microtime(TRUE));
        }
        $this->user = array_key_exists(self::USER_ID_TOKEN, $this->session) ? unserialize($this->session[self::USER_ID_TOKEN]) : NULL;
        $this->admin = array_key_exists(self::ADMIN_ID_TOKEN, $this->session) ? unserialize($this->session[self::ADMIN_ID_TOKEN]) : NULL;
        if (null === $this->admin) {
            $this->checkAdmin();
        }
        $this->setLoaded(true);
    }
public function init ( ) { $ this -> initSession ( ) ; $ this -> session = null === $ _SESSION ? array ( ) : $ _SESSION ; if ( NULL === $ this -> getSessionKey ( '__FLASH_CLEAR__' ) ) { $ this -> clearFlashes ( ) ; $ this -> setSessionKey ( '__FLASH_CLEAR__' , microtime ( TRUE ) ) ; } $ this -> user = array_key_exists ( self :: USER_ID_TOKEN , $ this -> session ) ? unserialize ( $ this -> session [ self :: USER_ID_TOKEN ] ) : NULL ; $ this -> admin = array_key_exists ( self :: ADMIN_ID_TOKEN , $ this -> session ) ? unserialize ( $ this -> session [ self :: ADMIN_ID_TOKEN ] ) : NULL ; if ( null === $ this -> admin ) { $ this -> checkAdmin ( ) ; } $ this -> setLoaded ( true ) ; }
Constructor por defecto
Constructor por defecto