Nette\Http\IResponse::redirect PHP Метод

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

Redirects to a new URL.
public redirect ( $url, $code = self::S302_FOUND ) : void
Результат void
    function redirect($url, $code = self::S302_FOUND);

Usage Example

Пример #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.');
     }
 }
All Usage Examples Of Nette\Http\IResponse::redirect