示例#1
0
文件: flow.php 项目: just-paja/fudjan
 /** Enqueue redirect. Passing REDIRECT_NOW will exit pwf and redirect immediately. Otherwise according to queue.
  * @param string $url  URL to redirect to
  * @param int    $code HTTP Status code to send
  * @param int    $when When to redirect, one of (\System\Module\Flow::REDIRECT_LATER,\System\Module\Flow::REDIRECT_AFTER_MODULES,\System\Module\Flow::REDIRECT_NOW)
  * @return void
  */
 public function redirect($url, $code = \System\Http\Response::FOUND, $when = self::REDIRECT_AFTER_MODULES)
 {
     $when === self::REDIRECT_IMMEDIATELY && \System\Http\Response::redirect($url, $code);
     $this->redirect[$when] = array("url" => $url, "code" => $code);
 }