Example #1
0
 protected function setCookie()
 {
     $data = json_encode($this->_data);
     $sig = $this->_sig($data . $this->_getCookieDomain(), $this->getOption('secret'));
     $params = session_get_cookie_params();
     Pix_HttpResponse::setcookie($this->_getCookieKey(), $sig . '|' . $data, $this->_getTimeout() ? time() + $this->_getTimeout() : null, $this->_getCookiePath(), $this->_getCookieDomain());
 }
Example #2
0
 /**
  * redirect finish action and redirect to $url
  *
  * @param string $url
  * @param int $code
  * @access public
  * @return void
  */
 public function redirect($url, $code = 302)
 {
     $url = preg_replace_callback('#[^A-Za-z0-9&/=\\#?()%]*#', function ($matches) {
         return urlencode($matches[0]);
     }, $url);
     Pix_HttpResponse::redirect($url, $code);
     return $this->noview();
 }
Example #3
0
 /**
  * redirect finish action and redirect to $url
  *
  * @param string $url
  * @param int $code
  * @access public
  * @return void
  */
 public function redirect($url, $code = 302)
 {
     Pix_HttpResponse::redirect($url, $code);
     return $this->noview();
 }