Changeset 22796 for branches/version-2_12-dev/data/class/SC_Response.php
- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Response.php
r22567 r22796 28 28 * @version $Id$ 29 29 */ 30 class SC_Response 31 { 30 class SC_Response{ 32 31 33 32 /** … … 50 49 * レスポンス出力を書き込む. 51 50 */ 52 function write() 53 { 51 function write() { 54 52 $this->sendHeader(); 55 53 echo $this->body; 56 54 } 57 55 58 function sendHeader() 59 { 56 function sendHeader() { 60 57 // HTTPのヘッダ 61 58 foreach ($this->header as $name => $head) { … … 67 64 } 68 65 69 function setContentType($contentType) 70 { 66 function setContentType($contentType) { 71 67 $this->header['Content-Type'] = $contentType; 72 68 } 73 69 74 function setResposeBody($body) 75 { 70 function setResposeBody($body) { 76 71 $this->body = $body; 77 72 } 78 73 79 function addHeader($name, $value) 80 { 74 function addHeader($name, $value) { 81 75 $this->header[$name] = $value; 82 76 } 83 77 84 function containsHeader($name) 85 { 78 function containsHeader($name) { 86 79 return isset($this->header[$name]); 87 80 } … … 91 84 * 各クラス内部で勝手にexitするな! 92 85 */ 93 function actionExit() 94 { 86 function actionExit() { 95 87 // ローカルフックポイント処理 96 88 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); … … 123 115 * @static 124 116 */ 125 function sendRedirect($location, $arrQueryString = array(), $inheritQueryString = false, $useSsl = null) 126 { 117 function sendRedirect($location, $arrQueryString = array(), $inheritQueryString = false, $useSsl = null) { 127 118 128 119 // ローカルフックポイント処理 … … 225 216 * @static 226 217 */ 227 function sendRedirectFromUrlPath($location, $arrQueryString = array(), $inheritQueryString = false, $useSsl = null) 228 { 218 function sendRedirectFromUrlPath($location, $arrQueryString = array(), $inheritQueryString = false, $useSsl = null) { 229 219 $location = ROOT_URLPATH . ltrim($location, '/'); 230 220 SC_Response_Ex::sendRedirect($location, $arrQueryString, $inheritQueryString, $useSsl); … … 234 224 * @static 235 225 */ 236 function reload($arrQueryString = array(), $removeQueryString = false) 237 { 226 function reload($arrQueryString = array(), $removeQueryString = false) { 238 227 // 現在の URL を取得 239 228 $netUrl = new Net_URL($_SERVER['REQUEST_URI']); … … 247 236 } 248 237 249 function setHeader($headers) 250 { 238 function setHeader($headers) { 251 239 $this->header = $headers; 252 240 } 253 241 254 function setStatusCode($statusCode = null) 255 { 242 function setStatusCode($statusCode = null) { 256 243 $this->statusCode = $statusCode; 257 244 } … … 272 259 * @static 273 260 */ 274 function sendHttpStatus($statusCode) 275 { 261 function sendHttpStatus($statusCode) { 276 262 $protocol = $_SERVER['SERVER_PROTOCOL']; 277 263 $httpVersion = (strpos($protocol, '1.1') !== false) ? '1.1' : '1.0';
Note: See TracChangeset
for help on using the changeset viewer.