public function cookies($name, $normalize = null, $default = null)
 {
     if ($this->hasCookies($name)) {
         if ($normalize != null) {
             return \GF\Common::normalize($this->_cookies[$name], $normalize);
         }
         return $this->_cookies[$name];
     }
     return $default;
 }
Example #2
0
 public function displayError($error)
 {
     try {
         $view = \GF\View::getInstance();
         $view->display('errors.' . $error);
     } catch (\Exception $exc) {
         \GF\Common::headerStatus($error);
         echo '<h1>' . $error . '</h1>';
         exit;
     }
 }