Changeset 21546 for branches/version-2_12-dev/data/class/SC_View.php
- Timestamp:
- 2012/02/23 15:34:37 (14 years ago)
- File:
-
- 1 edited
-
branches/version-2_12-dev/data/class/SC_View.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_View.php
r21514 r21546 27 27 28 28 var $_smarty; 29 30 var $objPage; 29 31 30 32 // コンストラクタ … … 89 91 } 90 92 } 93 // 各filterをセットします. 94 $this->registFilter(); 91 95 $res = $this->_smarty->fetch($template); 92 96 if (ADMIN_MODE == '1') { … … 97 101 return $res; 98 102 } 99 103 104 /** 105 * Pageオブジェクトをセットします. 106 * @param LC_Page_Ex $objPage 107 * @return void 108 */ 109 function setPage(LC_Page_Ex $objPage) { 110 $this->objPage = $objPage; 111 } 112 113 /** 114 * Smartyのfilterをセットします. 115 * @return void 116 */ 117 function registFilter() { 118 $this->_smarty->register_prefilter(array(&$this, 'prefilter_transforme')); 119 $this->_smarty->register_outputfilter(array(&$this, 'outputfilter_transforme')); 120 } 121 122 /** 123 * prefilter用のフィルタ関数。プラグイン用のフックポイント処理を実行 124 * @param string $source ソース 125 * @param Smarty_Compiler $smarty Smartyのコンパイラクラス 126 * @return string $source ソース 127 */ 128 function prefilter_transforme($source, &$smarty) { 129 // フックポイントを実行. 130 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 131 $objPlugin->doAction('prefilterTransforme', array(&$source, $this->objPage)); 132 return $source; 133 } 134 135 /** 136 * outputfilter用のフィルタ関数。プラグイン用のフックポイント処理を実行 137 * @param string $source ソース 138 * @param Smarty_Compiler $smarty Smartyのコンパイラクラス 139 * @return string $source ソース 140 */ 141 function outputfilter_transforme($source, &$smarty) { 142 // フックポイントを実行. 143 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 144 $objPlugin->doAction('outputfilterTransforme', array(&$source, $this->objPage)); 145 return $source; 146 } 147 100 148 // テンプレートの処理結果を表示 101 149 function display($template, $no_error = false) {
Note: See TracChangeset
for help on using the changeset viewer.
