3 * {$project_id}_Controller.php
6 * @package {$project_id}
10 /** Application base directory */
11 define('BASE', dirname(dirname(__FILE__)));
13 /** include_path setting (adding "/app" and "/lib" directory to include_path) */
16 set_include_path(implode(PATH_SEPARATOR, array($app, $lib)) . PATH_SEPARATOR . get_include_path());
19 /** including application library. */
20 require_once 'Ethna/Ethna.php';
21 require_once '{$project_id}_Error.php';
22 require_once '{$project_id}_ActionClass.php';
23 require_once '{$project_id}_ActionForm.php';
24 require_once '{$project_id}_ViewClass.php';
27 * {$project_id} application Controller definition.
31 * @package {$project_id}
33 class {$project_id}_Controller extends Ethna_Controller
40 * @var string Application ID(appid)
42 var $appid = '{$application_id}';
45 * @var array forward definition.
49 * TODO: write forward definition here.
54 * 'view_name' => '{$project_id}_View_Index',
60 * @var array action definition.
64 * TODO: write action definition here.
69 * 'form_name' => 'Sample_Form_SomeAction',
70 * 'form_path' => 'Some/Action.php',
71 * 'class_name' => 'Sample_Action_SomeAction',
72 * 'class_path' => 'Some/Action.php',
78 * @var array SOAP action definition.
80 var $soap_action = array(
82 * TODO: write action definition for SOAP application here.
85 * 'sample' => array(),
90 * @var array application directory.
92 var $directory = array(
93 'action' => 'app/action',
94 'action_cli' => 'app/action_cli',
95 'action_xmlrpc' => 'app/action_xmlrpc',
97 'plugin' => 'app/plugin',
100 'filter' => 'app/filter',
101 'locale' => 'locale',
103 'plugins' => array('app/plugin/Smarty', 'lib/Ethna/extlib/Plugin/Smarty'),
104 'template' => 'template',
105 'template_c' => 'tmp',
107 'view' => 'app/view',
109 'test' => 'app/test',
113 * @var array database access definition.
120 * @var array extention(.php, etc) configuration.
128 * @var array class definition.
132 * TODO: When you override Configuration class, Logger class,
133 * SQL class, don't forget to change definition as follows!
135 'class' => 'Ethna_ClassFactory',
136 'backend' => 'Ethna_Backend',
137 'config' => 'Ethna_Config',
138 'db' => 'Ethna_DB_PEAR',
139 'error' => 'Ethna_ActionError',
140 'form' => '{$project_id}_ActionForm',
141 'i18n' => 'Ethna_I18N',
142 'logger' => 'Ethna_Logger',
143 'plugin' => 'Ethna_Plugin',
144 'session' => 'Ethna_Session',
145 'sql' => 'Ethna_AppSQL',
146 'view' => '{$project_id}_ViewClass',
147 'renderer' => 'Ethna_Renderer_Smarty',
148 'url_handler' => '{$project_id}_UrlHandler',
152 * @var array filter definition.
156 * TODO: when you use filter, write filter plugin name here.
157 * (If you specify class name, Ethna reads filter class in
169 * Get Default language and locale setting.
170 * If you want to change Ethna's output encoding, override this method.
173 * @return array locale name(e.x ja_JP, en_US .etc),
174 * system encoding name,
175 * client encoding name(= template encoding)
176 * (locale name is "ll_cc" format. ll = language code. cc = country code.)
178 function _getDefaultLanguage()
180 return array('{$locale}', 'UTF-8', '{$client_enc}');
184 * テンプレートエンジンのデフォルト状態を設定する
187 * @param object Ethna_Renderer レンダラオブジェクト
190 function _setDefaultTemplateEngine(&$renderer)