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