redirect() публичный Метод

Redirects to a new URL.
public redirect ( $url, $code = self::S302_FOUND ) : void
Результат void
Пример #1
0
 /**
  * Performs a temporarily HTTP header 302 redirect
  *
  * @param string $path Page location path
  *
  * @return void
  *
  * @throws \InvalidArgumentException if location path is invalid
  *
  * @access public
  */
 public function redirectSoft($path)
 {
     if (!empty($path) && is_string($path)) {
         $this->response->redirect($path, 302);
     } else {
         throw new \InvalidArgumentException('A temporarily HTTP header 302 redirect requires a valid location path.');
     }
 }
Пример #2
0
	/**
	 * Sends response to output.
	 * @return void
	 */
	public function send(Http\IRequest $httpRequest, Http\IResponse $httpResponse)
	{
		$httpResponse->redirect($this->url, $this->code);
	}
Пример #3
0
getCode(){return$this->code;}function
send(Http\IRequest$httpRequest,Http\IResponse$httpResponse){$httpResponse->redirect($this->url,$this->code);}}class