OSDN Git Service

- controller での smarty_xx_plugin で Smarty プラグインを指定する機能を削除 http://sourceforge.jp/ticke...
authormaru_cc <maru_cc@2ef88817-412d-0410-a32c-8029a115e976>
Wed, 29 Apr 2009 10:11:59 +0000 (10:11 +0000)
committermaru_cc <maru_cc@2ef88817-412d-0410-a32c-8029a115e976>
Wed, 29 Apr 2009 10:11:59 +0000 (10:11 +0000)
CHANGES
class/Ethna_Controller.php
skel/app.controller.php
test/skel/app.controller.php

diff --git a/CHANGES b/CHANGES
index 72028a0..2e7321b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@
 -- ethna help コマンドを追加
 - 指定 Action が存在しない場合い、app/action 以下を全て include する仕様を変更
 - add-project -b オプションの挙動変更
+- controller での smarty_xx_plugin の機能を削除
 
 *** bug fix
 
index b0d3388..5d591c4 100644 (file)
@@ -134,25 +134,6 @@ class Ethna_Controller
     /** @var    object  レンダラー */
     var $renderer = null;
 
-    /** @var    array   smarty modifier定義 */
-    var $smarty_modifier_plugin = array();
-
-    /** @var    array   smarty function定義 */
-    var $smarty_function_plugin = array();
-
-    /** @var    array   smarty block定義 */
-    var $smarty_block_plugin = array();
-
-    /** @var    array   smarty prefilter定義 */
-    var $smarty_prefilter_plugin = array();
-
-    /** @var    array   smarty postfilter定義 */
-    var $smarty_postfilter_plugin = array();
-
-    /** @var    array   smarty outputfilter定義 */
-    var $smarty_outputfilter_plugin = array();
-
-
     /** @var    array   フィルターチェイン(Ethna_Filterオブジェクトの配列) */
     var $filter_chain = array();
 
@@ -1739,69 +1720,6 @@ class Ethna_Controller
 
         $this->renderer =& $this->class_factory->getObject('renderer');
 
-        // {{{ for B.C.
-        if (strtolower(get_class($this->renderer)) == "ethna_renderer_smarty") {
-            // user defined modifiers
-            foreach ($this->smarty_modifier_plugin as $modifier) {
-                if (!is_array($modifier)) {
-                    $name = str_replace('smarty_modifier_', '', $modifier);
-                    $this->renderer->setPlugin($name,'modifier', $modifier);
-                } else {
-                    $this->renderer->setPlugin($modifier[1], 'modifier', $modifier);
-                }
-            }
-
-            // user defined functions
-            foreach ($this->smarty_function_plugin as $function) {
-                if (!is_array($function)) {
-                    $name = str_replace('smarty_function_', '', $function);
-                    $this->renderer->setPlugin($name, 'function', $function);
-                } else {
-                    $this->renderer->setPlugin($function[1], 'function', $function);
-                }
-            }
-
-            // user defined blocks
-            foreach ($this->smarty_block_plugin as $block) {
-                if (!is_array($block)) {
-                    $name = str_replace('smarty_block_', '', $block);
-                    $this->renderer->setPlugin($name,'block', $block);
-                } else {
-                    $this->renderer->setPlugin($block[1],'block', $block);
-                }
-            }
-
-            // user defined prefilters
-            foreach ($this->smarty_prefilter_plugin as $prefilter) {
-                if (!is_array($prefilter)) {
-                    $name = str_replace('smarty_prefilter_', '', $prefilter);
-                    $this->renderer->setPlugin($name,'prefilter', $prefilter);
-                } else {
-                    $this->renderer->setPlugin($prefilter[1],'prefilter', $prefilter);
-                }
-            }
-
-            // user defined postfilters
-            foreach ($this->smarty_postfilter_plugin as $postfilter) {
-                if (!is_array($postfilter)) {
-                    $name = str_replace('smarty_postfilter_', '', $postfilter);
-                    $this->renderer->setPlugin($name,'postfilter', $postfilter);
-                } else {
-                    $this->renderer->setPlugin($postfilter[1],'postfilter', $postfilter);
-                }
-            }
-
-            // user defined outputfilters
-            foreach ($this->smarty_outputfilter_plugin as $outputfilter) {
-                if (!is_array($outputfilter)) {
-                    $name = str_replace('smarty_outputfilter_', '', $outputfilter);
-                    $this->renderer->setPlugin($name,'outputfilter', $outputfilter);
-                } else {
-                    $this->renderer->setPlugin($outputfilter[1],'outputfilter', $outputfilter);
-                }
-            }
-        }
-
         //テンプレートエンジンのデフォルトの設定
         $this->_setDefaultTemplateEngine($this->renderer);
         // }}}
index 739cfca..29ef5e1 100644 (file)
@@ -183,84 +183,6 @@ class {$project_id}_Controller extends Ethna_Controller
          */
     );
 
-    /**
-     *  @var    array   smarty modifier definition.
-     */
-    var $smarty_modifier_plugin = array(
-        /*
-         *  TODO: write user defined smarty modifier here.
-         *
-         *  Example:
-         *
-         *  'smarty_modifier_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty function definition.
-     */
-    var $smarty_function_plugin = array(
-        /*
-         *  TODO: write user defined smarty function here.
-         *
-         *  Example:
-         *
-         *  'smarty_function_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty block definition.
-     */
-    var $smarty_block_plugin = array(
-        /*
-         *  TODO: write user defined smarty block here.
-         *
-         *  Example:
-         * 
-         *  'smarty_block_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty prefilter definition.
-     */
-    var $smarty_prefilter_plugin = array(
-        /*
-         *  TODO: write user defined smarty prefilter here.
-         *
-         *  Example:
-         *
-         *  'smarty_prefilter_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty postfilter definition.
-     */
-    var $smarty_postfilter_plugin = array(
-        /*
-         *  TODO: write user defined smarty postfilter here.
-         *
-         *  Example:
-         *
-         *  'smarty_postfilter_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty outputfilter definition.
-     */
-    var $smarty_outputfilter_plugin = array(
-        /*
-         *  TODO: write user defined smarty outputfilter here.
-         *
-         *  Example:
-         *
-         *  'smarty_outputfilter_foo_bar',
-         */
-    );
-
     /**#@-*/
 
     /**
index 5bd8a38..0c8a0ba 100644 (file)
@@ -178,84 +178,6 @@ class {$project_id}_Controller extends Ethna_Controller
          */
     );
 
-    /**
-     *  @var    array   smarty modifier definition.
-     */
-    var $smarty_modifier_plugin = array(
-        /*
-         *  TODO: write user defined smarty modifier here.
-         *
-         *  Example:
-         *
-         *  'smarty_modifier_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty function definition.
-     */
-    var $smarty_function_plugin = array(
-        /*
-         *  TODO: write user defined smarty function here.
-         *
-         *  Example:
-         *
-         *  'smarty_function_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty block definition.
-     */
-    var $smarty_block_plugin = array(
-        /*
-         *  TODO: write user defined smarty block here.
-         *
-         *  Example:
-         * 
-         *  'smarty_block_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty prefilter definition.
-     */
-    var $smarty_prefilter_plugin = array(
-        /*
-         *  TODO: write user defined smarty prefilter here.
-         *
-         *  Example:
-         *
-         *  'smarty_prefilter_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty postfilter definition.
-     */
-    var $smarty_postfilter_plugin = array(
-        /*
-         *  TODO: write user defined smarty postfilter here.
-         *
-         *  Example:
-         *
-         *  'smarty_postfilter_foo_bar',
-         */
-    );
-
-    /**
-     *  @var    array   smarty outputfilter definition.
-     */
-    var $smarty_outputfilter_plugin = array(
-        /*
-         *  TODO: write user defined smarty outputfilter here.
-         *
-         *  Example:
-         *
-         *  'smarty_outputfilter_foo_bar',
-         */
-    );
-
     /**#@-*/
 
     /**