コード例 #1
0
ファイル: SessionMessage.php プロジェクト: devvoh/parable
 /**
  * Initialize the session object and store all current messages on ourself
  *
  * @param Values\Session $session
  */
 public function __construct(\Parable\Http\Values\Session $session)
 {
     $this->session = $session;
     if (is_array($this->session->get('messages'))) {
         $this->messages = $this->session->get('messages');
     }
 }
コード例 #2
0
ファイル: Authentication.php プロジェクト: devvoh/parable
 /**
  * Checks whether there's an auth session
  *
  * @return bool
  */
 protected function checkAuthentication()
 {
     $authSession = $this->session->get('auth');
     if ($authSession) {
         $this->setAuthenticated($authSession['authenticated']);
         $this->setAuthenticationData($authSession['data']);
         return true;
     }
     return false;
 }