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 ini_set('include_path', implode(PATH_SEPARATOR, array($app, $lib)) . PATH_SEPARATOR . ini_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.
73 * @var array SOAP action definition.
75 var $soap_action = array(
77 * TODO: write action definition for SOAP application here.
80 * 'sample' => array(),
85 * @var array application directory.
87 var $directory = array(
88 'action' => 'app/action',
89 'action_cli' => 'app/action_cli',
90 'action_xmlrpc' => 'app/action_xmlrpc',
92 'plugin' => 'app/plugin',
95 'filter' => 'app/filter',
99 'template' => 'template',
100 'template_c' => 'tmp',
102 'view' => 'app/view',
104 'test' => 'app/test',
108 * @var array database access definition.
115 * @var array extention(.php, etc) configuration.
123 * @var array class definition.
127 * TODO: When you override Configuration class, Logger class,
128 * SQL class, don't forget to change definition as follows!
130 'class' => 'Ethna_ClassFactory',
131 'backend' => 'Ethna_Backend',
132 'config' => 'Ethna_Config',
133 'db' => 'Ethna_DB_PEAR',
134 'error' => 'Ethna_ActionError',
135 'form' => '{$project_id}_ActionForm',
136 'i18n' => 'Ethna_I18N',
137 'logger' => 'Ethna_Logger',
138 'plugin' => 'Ethna_Plugin',
139 'session' => 'Ethna_Session',
140 'sql' => 'Ethna_AppSQL',
141 'view' => '{$project_id}_ViewClass',
142 'renderer' => 'Ethna_Renderer_Smarty',
143 'url_handler' => '{$project_id}_UrlHandler',
147 * @var array list of application id where Ethna searches plugin.
149 var $plugin_search_appids = array(
151 * write list of application id where Ethna searches plugin.
154 * When there are plugins whose name are like "Common_Plugin_Foo_Bar" in
155 * application plugin directory, Ethna searches them in the following order.
157 * 1. Common_Plugin_Foo_Bar,
158 * 2. {$project_id}_Plugin_Foo_Bar
159 * 3. Ethna_Plugin_Foo_Bar
161 * 'Common', '{$project_id}', 'Ethna',
163 '{$project_id}', 'Ethna',
167 * @var array filter definition.
171 * TODO: when you use filter, write filter plugin name here.
172 * (If you specify class name, Ethna reads filter class in
182 * @var array smarty modifier definition.
184 var $smarty_modifier_plugin = array(
186 * TODO: write user defined smarty modifier here.
190 * 'smarty_modifier_foo_bar',
195 * @var array smarty function definition.
197 var $smarty_function_plugin = array(
199 * TODO: write user defined smarty function here.
203 * 'smarty_function_foo_bar',
208 * @var array smarty block definition.
210 var $smarty_block_plugin = array(
212 * TODO: write user defined smarty block here.
216 * 'smarty_block_foo_bar',
221 * @var array smarty prefilter definition.
223 var $smarty_prefilter_plugin = array(
225 * TODO: write user defined smarty prefilter here.
229 * 'smarty_prefilter_foo_bar',
234 * @var array smarty postfilter definition.
236 var $smarty_postfilter_plugin = array(
238 * TODO: write user defined smarty postfilter here.
242 * 'smarty_postfilter_foo_bar',
247 * @var array smarty outputfilter definition.
249 var $smarty_outputfilter_plugin = array(
251 * TODO: write user defined smarty outputfilter here.
255 * 'smarty_outputfilter_foo_bar',
262 * Get Default language and locale setting.
263 * If you want to change Ethna's output encoding, override this method.
266 * @return array locale name(e.x ja_JP, en_US .etc),
267 * system encoding name,
268 * client encoding name(= template encoding)
269 * (locale name is "ll_cc" format. ll = language code. cc = country code.)
271 function _getDefaultLanguage()
273 return array('{$locale}', 'UTF-8', '{$client_enc}');