Changeset 19705 for branches/version-2_5-dev/data/class/SC_Display.php
- Timestamp:
- 2010/12/02 18:14:39 (12 years ago)
- bzr:base-revision:
- svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:19704
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/class/SC_Display.php 18986@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2FSC_Display.php
data/class/SC_Response.php 18986@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2FSC_Response.php
data/class/SC_SmartphoneUserAgent.php 19029@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2FSC_SmartphoneUserAgent.php
data/class/pages/LC_Page.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2FLC_Page.php
data/class/pages/admin/LC_Page_Admin.php 15280@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2FLC_Page_Admin.php- bzr:mapping-version:
- v4
- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20101202091436-vcp9ha97310kgcx0
- bzr:revno:
- 2434
- bzr:revprop:branch-nick:
- branches/version-2_5-dev
- bzr:root:
- branches/version-2_5-dev
- bzr:timestamp:
- 2010-12-02 18:14:36.931999922 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2010-12-02T09:14:36.932000Z
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_Display.php
r19683 r19705 1 1 <?php 2 // TODO GPLのあれ 2 /* 3 * This file is part of EC-CUBE 4 * 5 * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. 6 * 7 * http://www.lockon.co.jp/ 8 * 9 * This program is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License 11 * as published by the Free Software Foundation; either version 2 12 * of the License, or (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 */ 23 24 /** 25 * Http コンテンツ出力を制御するクラス. 26 * 27 * @author Ryuichi Tokugami 28 * @version $Id$ 29 */ 3 30 class SC_Display{ 4 31 … … 9 36 var $autoSet; 10 37 11 /** 12 * 13 * @var SC_View 38 /** SC_View インスタンス */ 39 var $view; 40 41 var $deviceSeted = false; 42 43 /* 44 * TODO php4を捨てたときに ここのコメントアウトを外してね。 45 * const('MOBILE',1); 46 * const('SMARTPHONE',2); 47 * const('PC',4); 48 * const('ADMIN',8); 14 49 */ 15 var $view; 16 17 var $deviceSeted = false; 18 19 // TODO php4を捨てたときに ここのコメントアウトを外してね。 20 /* 21 * const('MOBILE',1); 22 * const('SMARTPHONE',2); 23 * const('PC',4); 24 * const('ADMIN',8); 25 */ 26 function SC_Display($setPrevURL=true,$autoGenerateHttpHeaders = true){ 27 require_once(CLASS_EX_PATH."/SC_Response_Ex.php"); 50 51 function SC_Display($hasPrevURL = true, $autoGenerateHttpHeaders = true) { 52 require_once(CLASS_EX_PATH . "SC_Response_Ex.php"); 28 53 $this->response = new SC_Response_Ex(); 29 54 $this->autoSet = $autoGenerateHttpHeaders; 30 if ($ setPrevURL) {55 if ($hasPrevURL) { 31 56 $this->setPrevURL(); 32 57 } 33 58 } 34 59 35 60 function setPrevURL(){ 61 // TODO SC_SiteSession で実装した方が良さげ 36 62 $objCartSess = new SC_CartSession(); 37 63 $objCartSess->setPrevURL($_SERVER['REQUEST_URI']); 38 39 64 } 40 65 41 42 // TODO このメソッドは、レスポンスを返すためのメソッドです。名前を絶対に変えましょう。43 66 /** 44 * 45 * @param $page LC_Page 46 */ 47 function hoge($page, $is_admin = false){ 67 * LC_Page のパラメータを, テンプレートに設定し, 出力の準備を行う. 68 * 69 * @param LC_Page $page LC_Page インスタンス 70 * @param $is_admin boolean 管理画面を扱う場合 true 71 */ 72 function prepare($page, $is_admin = false){ 48 73 if(!$this->deviceSeted || !is_null($this->view)){ 49 74 $device = ($is_admin) ? 8 : $this->detectDevice(); … … 53 78 $this->response->setResposeBody($this->view->getResponse($page->getTemplate())); 54 79 } 55 80 81 /** 82 * リダイレクトを行う. 83 * 84 * SC_Response::sendRedirect() のラッパーです. 85 */ 56 86 function redirect($location){ 57 87 $this->response->sendRedirect($location); 58 88 } 59 89 90 /** 91 * リロードを行う. 92 * 93 * SC_Response::reload() のラッパーです. 94 */ 60 95 function reload($queryString = array(), $removeQueryString = false){ 61 96 $this->response->reload($queryString, $removeQueryString); 62 97 } 63 64 function noAction(){ 98 99 function noAction(){ 65 100 return; 66 101 } 67 102 103 /** 104 * ヘッダを追加する. 105 */ 68 106 function addHeader($name, $value){ 69 107 $this->response->addHeader($name, $value); … … 75 113 */ 76 114 function setDevice($device=4){ 77 115 78 116 switch ($device){ 79 117 case 1: … … 92 130 $this->deviceSeted = true; 93 131 } 94 132 133 /** 134 * SC_View インスタンスを設定する. 135 */ 95 136 function setView($view){ 96 97 137 $this->view = $view; 98 138 } … … 135 175 $this->view->assignarray($array); 136 176 } 137 138 139 177 }
Note: See TracChangeset
for help on using the changeset viewer.