Source for file Filter.php

Documentation is available at Filter.php

  1. <?php
  2. // vim: foldmethod=marker
  3. /**
  4.  *  Filter.php
  5.  *
  6.  *  @author     Masaki Fujimoto <fujimoto@php.net>
  7.  *  @license    http://www.opensource.org/licenses/bsd-license.php The BSD License
  8.  *  @package    Ethna
  9.  *  @version    $Id: e882f25f52bd6ce41075ec92ff41c1f9bc8dc610 $
  10.  */
  11.  
  12. // {{{ Ethna_Filter
  13. /**
  14.  *  フレームワークのフィルタ基底クラス
  15.  *
  16.  *  Mojaviの真似です(きっぱり)。アクション実行前に各種処理を行うことが
  17.  *  出来ます。
  18.  *
  19.  *  @author     Masaki Fujimoto <fujimoto@php.net>
  20.  *  @access     public
  21.  *  @package    Ethna
  22.  *  @obsolete
  23.  */
  24. {
  25.     /**#@+
  26.      *  @access private
  27.      */
  28.  
  29.     /** @protected    object  Ethna_Controller    controllerオブジェクト */
  30.     protected $controller;
  31.  
  32.     /** @protected    object  Ethna_Controller    controllerオブジェクト($controllerの省略形) */
  33.     protected $ctl;
  34.  
  35.     /** @protected    object  Ethna_Config        設定オブジェクト */
  36.     protected $config;
  37.  
  38.     /** @protected    object  Ethna_Logger        ログオブジェクト */
  39.     protected $logger;
  40.  
  41.     /**#@-*/
  42.  
  43.  
  44.     /**
  45.      *  Ethna_Filterのコンストラクタ
  46.      *
  47.      *  @access public
  48.      *  @param  object  Ethna_Controller    &$controller    コントローラオブジェクト
  49.      */
  50.     public function __construct(&$controller)
  51.     {
  52.         // オブジェクトの設定
  53.         $this->controller = $controller;
  54.         $this->ctl = $this->controller;
  55.  
  56.         $this->config = $controller->getConfig();
  57.         $this->logger = $this->controller->getLogger();
  58.     }
  59.  
  60.     /**
  61.      *  実行前フィルタ
  62.      *
  63.      *  @access public
  64.      *  @return Ethna_Error:実行中止 any:正常終了
  65.      */
  66.     function preFilter()
  67.     {
  68.     }
  69.  
  70.     /**
  71.      *  アクション実行前フィルタ
  72.      *
  73.      *  @access public
  74.      *  @param  string  $action_name    実行されるアクション名
  75.      *  @return string  null:正常終了 (string):実行するアクション名を変更
  76.      */
  77.     function preActionFilter($action_name)
  78.     {
  79.         return null;
  80.     }
  81.  
  82.     /**
  83.      *  アクション実行後フィルタ
  84.      *
  85.      *  @access public
  86.      *  @param  string  $action_name    実行されたアクション名
  87.      *  @param  string  $forward_name   実行されたアクションからの戻り値
  88.      *  @return string  null:正常終了 (string):遷移名を変更
  89.      */
  90.     function postActionFilter($action_name$forward_name)
  91.     {
  92.         return null;
  93.     }
  94.  
  95.     /**
  96.      *  実行後フィルタ
  97.      *
  98.      *  @access public
  99.      *  @return Ethna_Error:実行中止 any:正常終了
  100.      */
  101.     function postFilter()
  102.     {
  103.     }
  104. }
  105. // }}}

Documentation generated on Fri, 11 Nov 2011 03:58:08 +0900 by phpDocumentor 1.4.3