source: branches/version-2_13-dev/tests/class/replace/SC_Response_Ex.php @ 22856

Revision 22856, 1.2 KB checked in by Seasoft, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.13.0)

  • 主に空白・空白行の調整。もう少し整えたいが、一旦現状コミット。
Line 
1<?php
2require_once(realpath(dirname(__FILE__)) . "/../../../data/class/SC_Response.php");
3/**
4 * テスト用にexitしないSC_Responseクラスです。
5 */
6class SC_Response_Ex extends SC_Response
7{
8
9  /** exitしたかどうかを保持するフラグ */
10  var $exited = FALSE;
11  /** リダイレクト先のパスを保持するフラグ */
12  var $redirectPath = '';
13
14  /**
15   * SC_Response::actionExit()をラップし、PHPをexitさせないようにします。
16   */
17  function actionExit()
18  {
19    $this->exited = TRUE;
20  }
21
22  /**
23   * SC_Response::sendRedirect()をラップし、PHPをexitさせないようにします。
24   * また、リダイレクト先のパスを取得できるようにします。
25   */
26  function sendRedirect($location, $arrQueryString = array(), $inheritQuerySring = false, $useSsl = null)
27  {
28    $this->exited = TRUE;
29    $this->redirectPath = $location;
30  }
31
32  /**
33   * actionExit()が呼ばれたかどうかを取得します。
34   */
35  public function isExited()
36  {
37    return $this->exited;
38  }
39
40  /**
41   * sendRedirect()で指定されたパスを取得します。
42   */
43  public function getRedirectPath()
44  {
45    return $this->redirectPath;
46  }
47}
48
Note: See TracBrowser for help on using the repository browser.