OSDN Git Service

- converted skel encodings from UTF-8 to ASCII for i18n improvement.
authormumumu-org <mumumu-org@2ef88817-412d-0410-a32c-8029a115e976>
Tue, 13 May 2008 22:41:22 +0000 (22:41 +0000)
committermumumu-org <mumumu-org@2ef88817-412d-0410-a32c-8029a115e976>
Tue, 13 May 2008 22:41:22 +0000 (22:41 +0000)
19 files changed:
CHANGES
skel/app.action.default.php
skel/app.actionclass.php
skel/app.actionform.php
skel/app.controller.php
skel/app.error.php
skel/app.plugin.filter.default.php
skel/app.unittest.php
skel/app.url_handler.php
skel/app.view.default.php
skel/app.viewclass.php
skel/skel.action.php
skel/skel.action_cli.php
skel/skel.action_test.php
skel/skel.action_xmlrpc.php
skel/skel.app_object.php
skel/skel.test.php
skel/skel.view.php
skel/skel.view_test.php

diff --git a/CHANGES b/CHANGES
index 834c9da..d0bb913 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,14 @@
 * 変更点一覧
 
+** 2.5.0-dev
+
+*** features
+
+- ソースコード全体をUTF-8化
+-- 但し、日本語のソースコードコメントはそのまま
+- 国際化 (i18n) のための機能追加
+-- スケルトンの日本語コメントをすべてASCIIに変更(好みのエンコーディングで編集できるようにするため)
+
 ** 2.3.5
 
 *** features
index 2b00cae..290cc1c 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  indexフォームの実装
+ *  Index form implementation
  *
  *  @author    {$author}
  *  @access    public
 
 class {$project_id}_Form_Index extends {$project_id}_ActionForm
 {
-    /** @var    bool    バリデータにプラグインを使うフラグ */
+    /** @var    bool    specify if you use validator plugin */
     var $use_validator_plugin = false;
 
     /**
      *  @access   private
-     *  @var      array   フォーム値定義
+     *  @var      array   form definition.
      */
-     var $form = array(
+    var $form = array(
        /*
-        *  TODO: このアクションが使用するフォームを記述してください
+        *  TODO: Write form definition which this action uses.
+        *  @see http://ethna.jp/ethna-document-dev_guide-form.html
         *
-        *  記述例(typeを除く全ての要素は省略可能):
+        *  Example(You can omit all elements except for "type" one) :
         *
         *  'sample' => array(
-        *  // フォームの定義
-        *      'type'        => VAR_TYPE_INT,        // 入力値型
-        *      'form_type'   => FORM_TYPE_TEXT,      // フォーム型
-        *      'name'        => 'サンプル',          // 表示名
+        *      // Form definition
+        *      'type'        => VAR_TYPE_INT,    // Input type
+        *      'form_type'   => FORM_TYPE_TEXT,  // Form type
+        *      'name'        => 'Sample',        // Display name
         *  
-        *  // バリデータ(記述順にバリデータが実行されます)
-        *      'required'    => true,                        // 必須オプション(true/false)
-        *      'min'         => null,                        // 最小値
-        *      'max'         => null,                        // 最大値
-        *      'regexp'      => null,                        // 文字種指定(正規表現)
+        *      //  Validator (executes Validator by written order.)
+        *      'required'    => true,            // Required Option(true/false)
+        *      'min'         => null,            // Minimum value
+        *      'max'         => null,            // Maximum value
+        *      'regexp'      => null,            // String by Regexp
+        *      'mbregexp'    => null,            // Multibype string by Regexp
+        *      'mbregexp_encoding' => 'UTF-8',   // Matching encoding when using mbregexp 
         *
-        *  // フィルタ
-        *      'filter'      => null,                        // 入力値変換フィルタオプション
+        *      //  Filter
+        *      'filter'      => 'sample',        // Optional Input filter to convert input
+        *      'custom'      => null,            // Optional method name which
+        *                                        // is defined in this(parent) class.
         *  ),
         */
-      );
+    );
+
+    /**
+     *  Form input value convert filter : sample
+     *
+     *  @access protected
+     *  @param  mixed   $value  Form Input Value
+     *  @return mixed           Converted result.
+     */
+    /*
+    function _filter_sample($value)
+    {
+        //  convert to upper case.
+        return strtoupper($value);
+    }
+    */
 }
 
 /**
- *  indexアクションの実装
+ *  Index action implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -58,26 +78,33 @@ class {$project_id}_Form_Index extends {$project_id}_ActionForm
  */
 class {$project_id}_Action_Index extends {$project_id}_ActionClass
 {
+    /**
+     *  preprocess Index action.
+     *
+     *  @access    public
+     *  @return    string  Forward name (null if no errors.)
+     */
+    function prepare()
+    {
         /**
-         *  indexアクションの前処理
-         *
-         *  @access    public
-         *  @return    string  Forward先(正常終了ならnull)
-         */
-        function prepare()
-        {
-                return null;
+        if ($this->af->validate() > 0) {
+            return 'error';
         }
+        $sample = $this->af->get('sample');
+        */
+        return null;
+    }
 
-        /**
-         *  indexアクションの実装
-         *
-         *  @access    public
-         *  @return    string  遷移名
-         */
-        function perform()
-        {
-                return 'index';
-        }
+    /**
+     *  Index action implementation.
+     *
+     *  @access    public
+     *  @return    string  Forward Name.
+     */
+    function perform()
+    {
+        return 'index';
+    }
 }
+
 ?>
index 72e348c..3aa3490 100644 (file)
@@ -10,7 +10,7 @@
 
 // {{{ {$project_id}_ActionClass
 /**
- *  action実行クラス
+ *  action execution class
  *
  *  @author     {$author}
  *  @package    {$project_id}
 class {$project_id}_ActionClass extends Ethna_ActionClass
 {
     /**
-     *  アクション実行前の認証処理を行う
+     *  authenticate before executing action.
      *
      *  @access public
-     *  @return string  遷移名(nullなら正常終了, falseなら処理終了)
+     *  @return string  Forward name.
+     *                  (null if no errors. false if we have something wrong.)
      */
     function authenticate()
     {
@@ -30,10 +31,11 @@ class {$project_id}_ActionClass extends Ethna_ActionClass
     }
 
     /**
-     *  アクション実行前の処理(フォーム値チェック等)を行う
+     *  Preparation for executing action. (Form input check, etc.)
      *
      *  @access public
-     *  @return string  遷移名(nullなら正常終了, falseなら処理終了)
+     *  @return string  Forward name.
+     *                  (null if no errors. false if we have something wrong.)
      */
     function prepare()
     {
@@ -41,10 +43,11 @@ class {$project_id}_ActionClass extends Ethna_ActionClass
     }
 
     /**
-     *  アクション実行
+     *  execute action.
      *
      *  @access public
-     *  @return string  遷移名(nullなら遷移は行わない)
+     *  @return string  Forward name.
+     *                  (we does not forward if returns null.)
      */
     function perform()
     {
@@ -52,4 +55,5 @@ class {$project_id}_ActionClass extends Ethna_ActionClass
     }
 }
 // }}}
+
 ?>
index 118599a..cd0a2a6 100644 (file)
@@ -10,7 +10,7 @@
 
 // {{{ {$project_id}_ActionForm
 /**
- *  アクションフォームクラス
+ *  ActionForm class.
  *
  *  @author     {$author}
  *  @package    {$project_id}
@@ -22,20 +22,20 @@ class {$project_id}_ActionForm extends Ethna_ActionForm
      *  @access private
      */
 
-    /** @var    array   フォーム値定義(デフォルト) */
+    /** @var    array   form definition (default) */
     var $form_template = array();
 
-    /** @var    bool    バリデータにプラグインを使うフラグ */
+    /** @var    bool    specify if you use validator plugin */
     var $use_validator_plugin = true;
 
     /**#@-*/
 
     /**
-     *  フォーム値検証のエラー処理を行う
+     *  Error handling of form input validation.
      *
      *  @access public
-     *  @param  string      $name   フォーム項目名
-     *  @param  int         $code   エラーコード
+     *  @param  string      $name   form item name.
+     *  @param  int         $code   error code.
      */
     function handleError($name, $code)
     {
@@ -43,11 +43,11 @@ class {$project_id}_ActionForm extends Ethna_ActionForm
     }
 
     /**
-     *  フォーム値定義テンプレートを設定する
+     *  setter method for form template.
      *
      *  @access protected
-     *  @param  array   $form_template  フォーム値テンプレート
-     *  @return array   フォーム値テンプレート
+     *  @param  array   $form_template  form template
+     *  @return array   form template after setting.
      */
     function _setFormTemplate($form_template)
     {
@@ -55,7 +55,7 @@ class {$project_id}_ActionForm extends Ethna_ActionForm
     }
 
     /**
-     *  フォーム値定義を設定する
+     *  setter method for form definition.
      *
      *  @access protected
      */
@@ -66,4 +66,5 @@ class {$project_id}_ActionForm extends Ethna_ActionForm
 
 }
 // }}}
+
 ?>
index 83fd0e7..511b396 100644 (file)
@@ -7,16 +7,16 @@
  *  @version    $Id$
  */
 
-/** アプリケーションベースディレクトリ */
+/** Application base directory */
 define('BASE', dirname(dirname(__FILE__)));
 
-/** include_pathの設定(アプリケーションディレクトリを追加) */
+/** include_path setting (adding "/app" and "/lib" directory to include_path) */
 $app = BASE . "/app";
 $lib = BASE . "/lib";
 ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . implode(PATH_SEPARATOR, array($app, $lib)));
 
 
-/** アプリケーションライブラリのインクルード */
+/** including application library. */
 require_once 'Ethna/Ethna.php';
 require_once '{$project_id}_Error.php';
 require_once '{$project_id}_ActionClass.php';
@@ -24,7 +24,7 @@ require_once '{$project_id}_ActionForm.php';
 require_once '{$project_id}_ViewClass.php';
 
 /**
- *  {$project_id}アプリケーションのコントローラ定義
+ *  {$project_id} application Controller definition.
  *
  *  @author     {$author}
  *  @access     public
@@ -37,18 +37,18 @@ class {$project_id}_Controller extends Ethna_Controller
      */
 
     /**
-     *  @var    string  アプリケーションID
+     *  @var    string  Application ID(appid)
      */
     var $appid = '{$application_id}';
 
     /**
-     *  @var    array   forward定義
+     *  @var    array   forward definition.
      */
     var $forward = array(
         /*
-         *  TODO: ここにforward先を記述してください
+         *  TODO: write forward definition here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'index'         => array(
          *      'view_name' => '{$project_id}_View_Index',
@@ -57,33 +57,32 @@ class {$project_id}_Controller extends Ethna_Controller
     );
 
     /**
-     *  @var    array   action定義
+     *  @var    array   action definition.
      */
     var $action = array(
         /*
-         *  TODO: ここにaction定義を記述してください
+         *  TODO: write action definition here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'index'     => array(),
          */
     );
 
     /**
-     *  @var    array   soap action定義
+     *  @var    array   SOAP action definition.
      */
     var $soap_action = array(
         /*
-         *  TODO: ここにSOAPアプリケーション用のaction定義を
-         *  記述してください
-         *  記述例:
+         *  TODO: write action definition for SOAP application here.
+         *  Example:
          *
          *  'sample'            => array(),
          */
     );
 
     /**
-     *  @var    array       アプリケーションディレクトリ
+     *  @var    array       application directory.
      */
     var $directory = array(
         'action'        => 'app/action',
@@ -106,14 +105,14 @@ class {$project_id}_Controller extends Ethna_Controller
     );
 
     /**
-     *  @var    array       DBアクセス定義
+     *  @var    array       database access definition.
      */
     var $db = array(
         ''              => DB_TYPE_RW,
     );
 
     /**
-     *  @var    array       拡張子設定
+     *  @var    array       extention(.php, etc) configuration.
      */
     var $ext = array(
         'php'           => 'php',
@@ -121,12 +120,12 @@ class {$project_id}_Controller extends Ethna_Controller
     );
 
     /**
-     *  @var    array   クラス定義
+     *  @var    array   class definition.
      */
     var $class = array(
         /*
-         *  TODO: 設定クラス、ログクラス、SQLクラスをオーバーライド
-         *  した場合は下記のクラス名を忘れずに変更してください
+         *  TODO: When you override Configuration class, Logger class,
+         *        SQL class, don't forget to change definition as follows!
          */
         'class'         => 'Ethna_ClassFactory',
         'backend'       => 'Ethna_Backend',
@@ -145,17 +144,19 @@ class {$project_id}_Controller extends Ethna_Controller
     );
 
     /**
-     *  @var    array       検索対象となるプラグインのアプリケーションIDのリスト
+     *  @var    array       list of application id where Ethna searches plugin.
      */
     var $plugin_search_appids = array(
         /*
-         *  プラグイン検索時に検索対象となるアプリケーションIDのリストを記述します。
+         *  write list of application id where Ethna searches plugin.
          *
-         *  記述例:
-         *  Common_Plugin_Foo_Bar のような命名のプラグインがアプリケーションの
-         *  プラグインディレクトリに存在する場合、以下のように指定すると
-         *  Common_Plugin_Foo_Bar, {$project_id}_Plugin_Foo_Bar, Ethna_Plugin_Foo_Bar
-         *  の順にプラグインが検索されます。 
+         *  Example:
+         *  When there are plugins whose name are like "Common_Plugin_Foo_Bar" in
+         *  application plugin directory, Ethna searches them in the following order.
+         *
+         *  1. Common_Plugin_Foo_Bar,
+         *  2. {$project_id}_Plugin_Foo_Bar
+         *  3. Ethna_Plugin_Foo_Bar
          *
          *  'Common', '{$project_id}', 'Ethna',
          */
@@ -163,94 +164,93 @@ class {$project_id}_Controller extends Ethna_Controller
     );
 
     /**
-     *  @var    array       フィルタ設定
+     *  @var    array       filter definition.
      */
     var $filter = array(
         /*
-         *  TODO: フィルタを利用する場合はここにそのプラグイン名を
-         *  記述してください
-         *  (クラス名を指定するとfilterディレクトリからフィルタクラス
-         *  を読み込みます)
+         *  TODO: when you use filter, write filter plugin name here.
+         *  (If you specify class name, Ethna reads filter class in 
+         *   filter directory)
          *
-         *  記述例:
+         *  Example:
          *
          *  'ExecutionTime',
          */
     );
 
     /**
-     *  @var    array   smarty modifier定義
+     *  @var    array   smarty modifier definition.
      */
     var $smarty_modifier_plugin = array(
         /*
-         *  TODO: ここにユーザ定義のsmarty modifier一覧を記述してください
+         *  TODO: write user defined smarty modifier here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'smarty_modifier_foo_bar',
          */
     );
 
     /**
-     *  @var    array   smarty function定義
+     *  @var    array   smarty function definition.
      */
     var $smarty_function_plugin = array(
         /*
-         *  TODO: ここにユーザ定義のsmarty function一覧を記述してください
+         *  TODO: write user defined smarty function here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'smarty_function_foo_bar',
          */
     );
 
     /**
-     *  @var    array   smarty block定義
+     *  @var    array   smarty block definition.
      */
     var $smarty_block_plugin = array(
         /*
-         *  TODO: ここにユーザ定義のsmarty block一覧を記述してください
-         *
-         *  記述例:
+         *  TODO: write user defined smarty block here.
          *
+         *  Example:
+         * 
          *  'smarty_block_foo_bar',
          */
     );
 
     /**
-     *  @var    array   smarty prefilter定義
+     *  @var    array   smarty prefilter definition.
      */
     var $smarty_prefilter_plugin = array(
         /*
-         *  TODO: ここにユーザ定義のsmarty prefilter一覧を記述してください
+         *  TODO: write user defined smarty prefilter here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'smarty_prefilter_foo_bar',
          */
     );
 
     /**
-     *  @var    array   smarty postfilter定義
+     *  @var    array   smarty postfilter definition.
      */
     var $smarty_postfilter_plugin = array(
         /*
-         *  TODO: ここにユーザ定義のsmarty postfilter一覧を記述してください
+         *  TODO: write user defined smarty postfilter here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'smarty_postfilter_foo_bar',
          */
     );
 
     /**
-     *  @var    array   smarty outputfilter定義
+     *  @var    array   smarty outputfilter definition.
      */
     var $smarty_outputfilter_plugin = array(
         /*
-         *  TODO: ここにユーザ定義のsmarty outputfilter一覧を記述してください
+         *  TODO: write user defined smarty outputfilter here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'smarty_outputfilter_foo_bar',
          */
@@ -258,4 +258,5 @@ class {$project_id}_Controller extends Ethna_Controller
 
     /**#@-*/
 }
+
 ?>
index d10e15a..2aa8d98 100644 (file)
@@ -7,13 +7,13 @@
  *  $Id$
  */
 
-/*--- アプリケーションエラー定義 ---*/
+/*--- Application Error Definition ---*/
 /*
- *  TODO: ここにアプリケーションのエラー定義を記述してください。
- *  なお、255までのエラーコードはフレームワークで予約されていますので
- *  エラーコードには256以上の整数を使用してください。
+ *  TODO: Write application error definition here.
+ *        Error codes 255 and below are reserved 
+ *        by Ethna, so use over 256 value for error code.
  *
- *  記述例:
+ *  Example:
  *  define('E_LOGIN_INVALID', 256);
  */
 ?>
index 435404f..b6a0098 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  実行時間計測フィルタプラグインの実装
+ *  filter plugin implementation for measuring execution time.
  *
  *  @author     {$author}
  *  @access     public
@@ -21,7 +21,7 @@ class {$project_id}_Plugin_Filter_ExecutionTime extends Ethna_Plugin_Filter
      */
 
     /**
-     *  @var    int     開始時間
+     *  @var    int     Start time.
      */
     var $stime;
 
@@ -29,7 +29,7 @@ class {$project_id}_Plugin_Filter_ExecutionTime extends Ethna_Plugin_Filter
 
 
     /**
-     *  実行前フィルタ
+     *  filter before first processing.
      *
      *  @access public
      */
@@ -41,11 +41,13 @@ class {$project_id}_Plugin_Filter_ExecutionTime extends Ethna_Plugin_Filter
     }
 
     /**
-     *  アクション実行前フィルタ
+     *  filter BEFORE executing action.
      *
      *  @access public
-     *  @param  string  $action_name    実行されるアクション名
-     *  @return string  null:正常終了 (string):実行するアクション名を変更
+     *  @param  string  $action_name  Action name.
+     *  @return string  null: normal.
+     *                string: if you return string, it will be interpreted
+     *                        as Action name which will be executed immediately.
      */
     function preActionFilter($action_name)
     {
@@ -53,12 +55,14 @@ class {$project_id}_Plugin_Filter_ExecutionTime extends Ethna_Plugin_Filter
     }
 
     /**
-     *  アクション実行後フィルタ
+     *  filter AFTER executing action.
      *
      *  @access public
-     *  @param  string  $action_name    実行されたアクション名
-     *  @param  string  $forward_name   実行されたアクションからの戻り値
-     *  @return string  null:正常終了 (string):遷移名を変更
+     *  @param  string  $action_name    executed Action name.
+     *  @param  string  $forward_name   return value from executed Action.
+     *  @return string  null: normal.
+     *                string: if you return string, it will be interpreted
+     *                        as Forward name.
      */
     function postActionFilter($action_name, $forward_name)
     {
@@ -66,7 +70,7 @@ class {$project_id}_Plugin_Filter_ExecutionTime extends Ethna_Plugin_Filter
     }
 
     /**
-     *  実行後フィルタ
+     *  filter which will be executed at the end.
      *
      *  @access public
      */
index 08dff0b..d0dbed7 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$project_id}ユニットテストマネージャクラス
+ *  {$project_id} Unit Test Manager Class.
  *
  *  @author     {$author}
  *  @access     public
 class {$project_id}_UnitTestManager extends Ethna_UnitTestManager
 {
     /**
-     *  @var    array   一般テストケース定義
+     *  @var    array   General test case definition.
      */
     var $testcase = array(
         /*
-         *  TODO: ここに一般テストケース定義を記述してください
+         *  TODO: Write general test case definition here.
          *
-         *  記述例:
+         *  Example:
          *
          *  'util' => 'app/UtilTest.php',
          */
index 875ebad..d2812bc 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  URLハンドラクラス
+ *  URLHandler class.
  *
  *  @author     {$author}
  *  @access     public
@@ -16,7 +16,7 @@
  */
 class {$project_id}_UrlHandler extends Ethna_UrlHandler
 {
-    /** @var    array   アクションマッピング */
+    /** @var    array   Action Mapping */
     var $action_map = array(
         /*
         'user'  => array(
@@ -31,7 +31,7 @@ class {$project_id}_UrlHandler extends Ethna_UrlHandler
     );
 
     /**
-     *  {$project_id}_UrlHandlerクラスのインスタンスを取得する
+     *  get {$project_id}_UrlHandler class instance.
      *
      *  @access public
      */
@@ -41,9 +41,9 @@ class {$project_id}_UrlHandler extends Ethna_UrlHandler
         return $instance;
     }
 
-    // {{{ ゲートウェイリクエスト正規化
+    // {{{ normalize gateway request method.
     /**
-     *  リクエスト正規化(userゲートウェイ)
+     *  normalize request(via user defined gateway)
      *
      *  @access private
      */
@@ -55,9 +55,9 @@ class {$project_id}_UrlHandler extends Ethna_UrlHandler
      */
     // }}}
 
-    // {{{ ゲートウェイパス生成
+    // {{{ generate gateway path method.
     /**
-     *  パス生成(userゲートウェイ)
+     *  generate path(via user defined gateway)
      *
      *  @access private
      */
@@ -69,7 +69,7 @@ class {$project_id}_UrlHandler extends Ethna_UrlHandler
      */
     // }}}
 
-    // {{{ フィルタ
+    // {{{ filter 
     // }}}
 }
 
index 39a57b2..b097059 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  indexビューの実装
+ *  Index view implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -17,7 +17,7 @@
 class {$project_id}_View_Index extends {$project_id}_ViewClass
 {
     /**
-     *  遷移前処理
+     *  preprocess before forwarding.
      *
      *  @access public
      */
@@ -25,4 +25,5 @@ class {$project_id}_View_Index extends {$project_id}_ViewClass
     {
     }
 }
+
 ?>
index 992ed94..fef00b4 100644 (file)
@@ -10,7 +10,7 @@
 
 // {{{ {$project_id}_ViewClass
 /**
- *  viewクラス
+ *  View class.
  *
  *  @author     {$author}
  *  @package    {$project_id}
 class {$project_id}_ViewClass extends Ethna_ViewClass
 {
     /**
-     *  共通値を設定する
+     *  set common default value.
      *
      *  @access protected
-     *  @param  object  {$project_id}_Renderer  レンダラオブジェクト
+     *  @param  object  {$project_id}_Renderer  Renderer object.
      */
     function _setDefault(&$renderer)
     {
     }
 }
 // }}}
+
 ?>
index cc86483..39f578c 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$action_name}フォームの実装
+ *  {$action_name} Form implementation.
  *
  *  @author     {$author}
  *  @access     public
  */
 class {$action_form} extends {$project_id}_ActionForm
 {
-    /** @var    bool    バリデータにプラグインを使うフラグ */
+    /** @var    bool    specify if you use validator plugin */
     var $use_validator_plugin = true;
 
     /**
      *  @access private
-     *  @var    array   フォーム値定義
+     *  @var    array   form definition.
      */
     var $form = array(
-        /*
-        'sample' => array(
-            // フォームの定義
-            'type'          => VAR_TYPE_INT,    // 入力値型
-            'form_type'     => FORM_TYPE_TEXT,  // フォーム型
-            'name'          => 'サンプル',      // 表示名
-
-            // バリデータ(記述順にバリデータが実行されます)
-            'required'      => true,            // 必須オプション(true/false)
-            'min'           => null,            // 最小値
-            'max'           => null,            // 最大値
-            'regexp'        => null,            // 文字種指定(正規表現)
-
-            // フィルタ
-            'filter'        => null,            // 入力値変換フィルタオプション
-        ),
+       /*
+        *  TODO: Write form definition which this action uses.
+        *  @see http://ethna.jp/ethna-document-dev_guide-form.html
+        *
+        *  Example(You can omit all elements except for "type" one) :
+        *
+        *  'sample' => array(
+        *      // Form definition
+        *      'type'        => VAR_TYPE_INT,    // Input type
+        *      'form_type'   => FORM_TYPE_TEXT,  // Form type
+        *      'name'        => 'Sample',        // Display name
+        *  
+        *      //  Validator (executes Validator by written order.)
+        *      'required'    => true,            // Required Option(true/false)
+        *      'min'         => null,            // Minimum value
+        *      'max'         => null,            // Maximum value
+        *      'regexp'      => null,            // String by Regexp
+        *      'mbregexp'    => null,            // Multibype string by Regexp
+        *      'mbregexp_encoding' => 'UTF-8',   // Matching encoding when using mbregexp 
+        *
+        *      //  Filter
+        *      'filter'      => 'sample',        // Optional Input filter to convert input
+        *      'custom'      => null,            // Optional method name which
+        *                                        // is defined in this(parent) class.
+        *  ),
         */
     );
+
+    /**
+     *  Form input value convert filter : sample
+     *
+     *  @access protected
+     *  @param  mixed   $value  Form Input Value
+     *  @return mixed           Converted result.
+     */
+    /*
+    function _filter_sample($value)
+    {
+        //  convert to upper case.
+        return strtoupper($value);
+    }
+    */
 }
 
 /**
- *  {$action_name}アクションの実装
+ *  {$action_name} action implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -54,10 +78,11 @@ class {$action_form} extends {$project_id}_ActionForm
 class {$action_class} extends {$project_id}_ActionClass
 {
     /**
-     *  {$action_name}アクションの前処理
+     *  preprocess of {$action_name} Action.
      *
      *  @access public
-     *  @return string      遷移名(正常終了ならnull, 処理終了ならfalse)
+     *  @return string    forward name(null: success.
+     *                                false: in case you want to exit.)
      */
     function prepare()
     {
@@ -65,14 +90,15 @@ class {$action_class} extends {$project_id}_ActionClass
     }
 
     /**
-     *  {$action_name}アクションの実装
+     *  {$action_name} action implementation.
      *
      *  @access public
-     *  @return string  遷移名
+     *  @return string  forward name.
      */
     function perform()
     {
         return '{$action_name}';
     }
 }
+
 ?>
index 9eae66b..5b2ba93 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$action_name}フォームの実装
+ *  {$action_name} Form implementation.
  *
  *  @author     {$author}
  *  @access     public
  */
 class {$action_form} extends {$project_id}_ActionForm
 {
-    /** @var    bool    バリデータにプラグインを使うフラグ */
+    /** @var    bool    specify if you use validator plugin */
     var $use_validator_plugin = true;
 
     /**
      *  @access private
-     *  @var    array   フォーム値定義
+     *  @var    array   form definition.
      */
     var $form = array(
-        /*
-        'sample' => array(
-            // フォームの定義
-            'type'          => VAR_TYPE_INT,    // 入力値型
-            'form_type'     => FORM_TYPE_TEXT,  // フォーム型
-            'name'          => 'サンプル',      // 表示名
-
-            // バリデータ(記述順にバリデータが実行されます)
-            'required'      => true,            // 必須オプション(true/false)
-            'min'           => null,            // 最小値
-            'max'           => null,            // 最大値
-            'regexp'        => null,            // 文字種指定(正規表現)
-
-            // フィルタ
-            'filter'        => null,            // 入力値変換フィルタオプション
-        ),
+       /*
+        *  TODO: Write form definition which this action uses.
+        *  @see http://ethna.jp/ethna-document-dev_guide-form.html
+        *
+        *  Example(You can omit all elements except for "type" one) :
+        *
+        *  'sample' => array(
+        *      // Form definition
+        *      'type'        => VAR_TYPE_INT,    // Input type
+        *      'form_type'   => FORM_TYPE_TEXT,  // Form type
+        *      'name'        => 'Sample',        // Display name
+        *  
+        *      //  Validator (executes Validator by written order.)
+        *      'required'    => true,            // Required Option(true/false)
+        *      'min'         => null,            // Minimum value
+        *      'max'         => null,            // Maximum value
+        *      'regexp'      => null,            // String by Regexp
+        *      'mbregexp'    => null,            // Multibype string by Regexp
+        *      'mbregexp_encoding' => 'UTF-8',   // Matching encoding when using mbregexp 
+        *
+        *      //  Filter
+        *      'filter'      => 'sample',        // Optional Input filter to convert input
+        *      'custom'      => null,            // Optional method name which
+        *                                        // is defined in this(parent) class.
+        *  ),
         */
     );
+
+    /**
+     *  Form input value convert filter : sample
+     *
+     *  @access protected
+     *  @param  mixed   $value  Form Input Value
+     *  @return mixed           Converted result.
+     */
+    /*
+    function _filter_sample($value)
+    {
+        //  convert to upper case.
+        return strtoupper($value);
+    }
+    */
 }
 
 /**
- *  {$action_name}アクションの実装
+ *  {$action_name} action implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -54,10 +78,11 @@ class {$action_form} extends {$project_id}_ActionForm
 class {$action_class} extends {$project_id}_ActionClass
 {
     /**
-     *  {$action_name}アクションの前処理
+     *  preprocess of {$action_name} Action.
      *
      *  @access public
-     *  @return string      遷移名(正常終了ならnull, 処理終了ならfalse)
+     *  @return string    forward name(null: success.
+     *                                false: in case you want to exit.)
      */
     function prepare()
     {
@@ -65,14 +90,15 @@ class {$action_class} extends {$project_id}_ActionClass
     }
 
     /**
-     *  {$action_name}アクションの実装
+     *  {$action_name} action implementation.
      *
      *  @access public
-     *  @return string  遷移名
+     *  @return string  forward name.
      */
     function perform()
     {
         return null;
     }
 }
+
 ?>
index d643fa2..0cc3628 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$action_name}フォームのテストケース
+ *  {$action_name} Form testcase.
  *
  *  @author     {$author}
  *  @access     public
@@ -18,46 +18,46 @@ class {$action_form}_TestCase extends Ethna_UnitTestCase
 {
     /**
      *  @access private
-     *  @var    string  アクション名
+     *  @var    string  Action name.
      */
     var $action_name = '{$action_name}';
 
     /**
-     *    テストの初期化
+     *  initialize test.
      *
-     *    @access public
+     *  @access public
      */
     function setUp()
     {
-        $this->createActionForm();  // アクションフォームの作成
+        $this->createActionForm();  // create ActionForm.
     }
 
     /**
-     *    テストの後始末
+     *  clean up testcase.
      *
-     *    @access public
+     *  @access public
      */
     function tearDown()
     {
     }
 
     /**
-     *  {$action_name}アクションフォームのサンプルテストケース
+     *  {$action_name} ActionForm sample testcase.
      *
      *  @access public
      */
     function test_formSample()
     {
         /*
-        // フォームの設定
+        // setting form input.
         $this->af->set('id', 1);
 
-        // {$action_name}アクションフォーム値検証
+        // {$action_name} ActionForm input validation.
         $this->assertEqual($this->af->validate(), 0);
         */
 
         /**
-         *  TODO: テストケースを記述して下さい。
+         *  TODO: write test case! :)
          *  @see http://simpletest.org/en/first_test_tutorial.html
          *  @see http://simpletest.org/en/unit_test_documentation.html
          */
@@ -66,7 +66,7 @@ class {$action_form}_TestCase extends Ethna_UnitTestCase
 }
 
 /**
- *  {$action_name}アクションのテストケース
+ *  {$action_name} Action testcase.
  *
  *  @author     {$author}
  *  @access     public
@@ -76,63 +76,64 @@ class {$action_class}_TestCase extends Ethna_UnitTestCase
 {
     /**
      *  @access private
-     *  @var    string  アクション名
+     *  @var    string  Action name.
      */
     var $action_name = '{$action_name}';
 
     /**
-     *    テストの初期化
+     * initialize test.
      *
-     *    @access public
+     * @access public
      */
     function setUp()
     {
-        $this->createActionForm();  // アクションフォームの作成
-        $this->createActionClass(); // アクションクラスの作成
+        $this->createActionForm();  // create ActionForm.
+        $this->createActionClass(); // create ActionClass.
 
-        $this->session->start();            // セッションの開始
+        $this->session->start();    // start session.
     }
 
     /**
-     *    テストの後始末
+     *  clean up testcase.
      *
-     *    @access public
+     *  @access public
      */
     function tearDown()
     {
-        $this->session->destroy();      // セッションの破棄
+        $this->session->destroy();   // destroy session.
     }
 
     /**
-     *  {$action_name}アクションクラスのサンプルテストケース
+     *  {$action_name} ActionClass sample testcase.
      *
      *  @access public
      */
     function test_actionSample()
     {
         /*
-        // フォームの設定
+        // setting form input.
         $this->af->set('id', 1);
 
-        // {$action_name}アクション実行前の認証処理
+        // Authentication before processing {$action_name} Action.
         $forward_name = $this->ac->authenticate();
         $this->assertNull($forward_name);
 
-        // {$action_name}アクションの前処理
+        // {$action_name} Action preprocess.
         $forward_name = $this->ac->prepare();
         $this->assertNull($forward_name);
 
-        // {$action_name}アクションの実装
+        // {$action_name} Action implementation.
         $forward_name = $this->ac->perform();
         $this->assertEqual($forward_name, '{$action_name}');
         */
 
         /**
-         *  TODO: テストケースを記述して下さい。
+         *  TODO: write test case! :)
          *  @see http://simpletest.org/en/first_test_tutorial.html
          *  @see http://simpletest.org/en/unit_test_documentation.html
          */
         $this->fail('No Test! write Test!');
     }
 }
+
 ?>
index cc86483..1618f58 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$action_name}フォームの実装
+ *  {$action_name} Form implementation.
  *
  *  @author     {$author}
  *  @access     public
  */
 class {$action_form} extends {$project_id}_ActionForm
 {
-    /** @var    bool    バリデータにプラグインを使うフラグ */
+    /** @var    bool    specify if you use validator plugin */
     var $use_validator_plugin = true;
 
     /**
      *  @access private
-     *  @var    array   フォーム値定義
+     *  @var    array   form definition.
      */
     var $form = array(
-        /*
-        'sample' => array(
-            // フォームの定義
-            'type'          => VAR_TYPE_INT,    // 入力値型
-            'form_type'     => FORM_TYPE_TEXT,  // フォーム型
-            'name'          => 'サンプル',      // 表示名
-
-            // バリデータ(記述順にバリデータが実行されます)
-            'required'      => true,            // 必須オプション(true/false)
-            'min'           => null,            // 最小値
-            'max'           => null,            // 最大値
-            'regexp'        => null,            // 文字種指定(正規表現)
-
-            // フィルタ
-            'filter'        => null,            // 入力値変換フィルタオプション
-        ),
+       /*
+        *  TODO: Write form definition which this action uses.
+        *  @see http://ethna.jp/ethna-document-dev_guide-form.html
+        *
+        *  Example(You can omit all elements except for "type" one) :
+        *
+        *  'sample' => array(
+        *      // Form definition
+        *      'type'        => VAR_TYPE_INT,    // Input type
+        *      'form_type'   => FORM_TYPE_TEXT,  // Form type
+        *      'name'        => 'Sample',        // Display name
+        *  
+        *      //  Validator (executes Validator by written order.)
+        *      'required'    => true,            // Required Option(true/false)
+        *      'min'         => null,            // Minimum value
+        *      'max'         => null,            // Maximum value
+        *      'regexp'      => null,            // String by Regexp
+        *      'mbregexp'    => null,            // Multibype string by Regexp
+        *      'mbregexp_encoding' => 'UTF-8',   // Matching encoding when using mbregexp 
+        *
+        *      //  Filter
+        *      'filter'      => 'sample',        // Optional Input filter to convert input
+        *      'custom'      => null,            // Optional method name which
+        *                                        // is defined in this(parent) class.
+        *  ),
         */
     );
+
+    /**
+     *  Form input value convert filter : sample
+     *
+     *  @access protected
+     *  @param  mixed   $value  Form Input Value
+     *  @return mixed           Converted result.
+     */
+    /*
+    function _filter_sample($value)
+    {
+        //  convert to upper case.
+        return strtoupper($value);
+    }
+    */
 }
 
 /**
- *  {$action_name}アクションの実装
+ *  {$action_name} action implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -54,10 +78,11 @@ class {$action_form} extends {$project_id}_ActionForm
 class {$action_class} extends {$project_id}_ActionClass
 {
     /**
-     *  {$action_name}アクションの前処理
+     *  preprocess of {$action_name} Action.
      *
      *  @access public
-     *  @return string      遷移名(正常終了ならnull, 処理終了ならfalse)
+     *  @return string    forward name(null: success.
+     *                                false: in case you want to exit.)
      */
     function prepare()
     {
@@ -65,10 +90,10 @@ class {$action_class} extends {$project_id}_ActionClass
     }
 
     /**
-     *  {$action_name}アクションの実装
+     *  {$action_name} action implementation.
      *
      *  @access public
-     *  @return string  遷移名
+     *  @return string  forward name.
      */
     function perform()
     {
index 61ebe9a..82fb28d 100644 (file)
@@ -28,7 +28,7 @@ class {$app_object}Manager extends Ethna_AppManager
 class {$app_object} extends Ethna_AppObject
 {
     /**
-     *  プロパティの表示名を取得する
+     *  property display name getter.
      *
      *  @access public
      */
@@ -37,4 +37,5 @@ class {$app_object} extends Ethna_AppObject
         return $this->get($key);
     }
 }
+
 ?>
index 48fd680..b952614 100644 (file)
  * \r
  * @author    {$author}\r
  * @package   {$project_id}.Test\r
- * @version   1.0\r
  */\r
 class {$name}_TestCase extends Ethna_UnitTestCase\r
 {\r
     /**\r
-     * テストの初期化\r
+     * initialize test.\r
      * \r
      * @access public\r
      */\r
     function setUp()\r
     {\r
-        // TODO: テストに際しての初期化コードを記述してください\r
-        // 例: テスト用のデータをDBから読み込む\r
+        // TODO: write test initialization code.\r
+        // Example: read test data from database.\r
     }\r
     \r
     /**\r
-     * テストの後始末\r
+     *  clean up testcase.\r
      * \r
-     * @access public\r
+     *  @access public\r
      */\r
     function tearDown()\r
     {\r
-        // TODO: テスト終了に際してのコードを記述してください\r
-        // 例: テスト用のデータから開発用のデータに戻す\r
+        // TODO: write testcase cleanup code.\r
+        // Example: restore database data for development.\r
     }\r
     \r
     /**\r
-     * サンプルのテストケース\r
+     * sample testcase.\r
      * \r
      * @access public\r
      */\r
     function test_{$name}()\r
     {\r
         /**\r
-         *  TODO: テストケースを記述して下さい。\r
+         *  TODO: write test case! :)\r
          *  @see http://simpletest.org/en/first_test_tutorial.html\r
          *  @see http://simpletest.org/en/unit_test_documentation.html\r
          */\r
index 297d3a4..47c2691 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$forward_name}ビューの実装
+ *  {$forward_name} view implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -17,7 +17,7 @@
 class {$view_class} extends {$project_id}_ViewClass
 {
     /**
-     *  遷移前処理
+     *  preprocess before forwarding.
      *
      *  @access public
      */
@@ -25,4 +25,5 @@ class {$view_class} extends {$project_id}_ViewClass
     {
     }
 }
+
 ?>
index 846653a..87cd004 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 /**
- *  {$forward_name}ビューの実装
+ *  {$forward_name} view implementation.
  *
  *  @author     {$author}
  *  @access     public
@@ -18,48 +18,48 @@ class {$view_class}_TestCase extends Ethna_UnitTestCase
 {
     /**
      *  @access private
-     *  @var    string  ビュー名
+     *  @var    string  view name.
      */
     var $forward_name = '{$forward_name}';
 
     /**
-     *    テストの初期化
+     * initialize test.
      *
-     *    @access public
+     * @access public
      */
     function setUp()
     {
-        $this->createPlainActionForm(); // アクションフォームの作成
-        $this->createViewClass();       // ビューの作成
+        $this->createPlainActionForm(); // create ActionForm
+        $this->createViewClass();       // create View.
     }
 
     /**
-     *    テストの後始末
+     *  clean up testcase.
      *
-     *    @access public
+     *  @access public
      */
     function tearDown()
     {
     }
 
     /**
-     *  {$forward_name}遷移前処理のサンプルテストケース
+     *  {$forward_name} preprocess sample testcase.
      *
      *  @access public
      */
     function test_viewSample()
     {
         /*
-        // フォームの設定
+        // setting form input. 
         $this->af->set('id', 1);
 
-        // {$forward_name}遷移前処理
+        // {$forward_name} preprocess.
         $this->vc->preforward();
         $this->assertNull($this->af->get('data'));
         */
 
         /**
-         *  TODO: テストケースを記述して下さい。
+         *  TODO: write test case! :)
          *  @see http://simpletest.org/en/first_test_tutorial.html
          *  @see http://simpletest.org/en/unit_test_documentation.html
          */