Exemplo n.º 1
0
 public static function save($message, $level = Message::LEVEL_ERROR)
 {
     $c = __CLASS__;
     $message = new $c($message, $level);
     Session::start();
     $_SESSION['messages'][] = $message;
     return $message;
 }
Exemplo n.º 2
0
 protected function getTokenValue($name)
 {
     // Start session
     Session::start();
     if (!empty($_SESSION[$name])) {
         return $_SESSION[$name];
     } else {
         $token = $this->generateToken();
         $_SESSION[$name] = $token;
         return $token;
     }
 }