OSDN Git Service

- fix changes (added date)
[ethna/ethna.git] / skel / app.controller.php
index 27ca9ee..b060897 100644 (file)
@@ -2,9 +2,9 @@
 /**
  *     {$project_id}_Controller.php
  *
+ *     @author         {$author}
  *     @package        {$project_id}
- *
- *     $Id$
+ *     @version        $Id$
  */
 
 /** ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥ê */
@@ -13,7 +13,7 @@ define('BASE', dirname(dirname(__FILE__)));
 // include_path¤ÎÀßÄê(¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥Ç¥£¥ì¥¯¥È¥ê¤òÄɲÃ)
 $app = BASE . "/app";
 $lib = BASE . "/lib";
-ini_set('include_path', ini_get('include_path') . ":$app:$lib");
+ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . implode(PATH_SEPARATOR, array($app, $lib)));
 
 
 /** ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥é¥¤¥Ö¥é¥ê¤Î¥¤¥ó¥¯¥ë¡¼¥É */
@@ -23,7 +23,7 @@ include_once('{$project_id}_Error.php');
 /**
  *     {$project_id}¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥³¥ó¥È¥í¡¼¥éÄêµÁ
  *
- *     @author         your name
+ *     @author         {$author}
  *     @access         public
  *     @package        {$project_id}
  */
@@ -84,6 +84,10 @@ class {$project_id}_Controller extends Ethna_Controller
         */
        var $directory = array(
                'action'                => 'app/action',
+               'action_cli'    => 'app/action_cli',
+        'action_xmlrpc' => 'app/action_xmlrpc',
+        'app'           => 'app',
+        'bin'           => 'bin',
                'etc'                   => 'etc',
                'filter'                => 'app/filter',
                'locale'                => 'locale',
@@ -118,10 +122,17 @@ class {$project_id}_Controller extends Ethna_Controller
                 *      TODO: ÀßÄꥯ¥é¥¹¡¢¥í¥°¥¯¥é¥¹¡¢SQL¥¯¥é¥¹¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É
                 *      ¤·¤¿¾ì¹ç¤Ï²¼µ­¤Î¥¯¥é¥¹Ì¾¤ò˺¤ì¤º¤ËÊѹ¹¤·¤Æ¤¯¤À¤µ¤¤
                 */
-               'config'        => 'Ethna_Config',
-               'db'                    => 'Ethna_DB',
-               'logger'        => 'Ethna_Logger',
-               'sql'           => 'Ethna_AppSQL',
+               'class'                 => 'Ethna_ClassFactory',
+               'backend'               => 'Ethna_Backend',
+               'config'                => 'Ethna_Config',
+               'db'                    => 'Ethna_DB_PEAR',
+               'error'                 => 'Ethna_ActionError',
+               'form'                  => 'Ethna_ActionForm',
+               'i18n'                  => 'Ethna_I18N',
+               'logger'                => 'Ethna_Logger',
+               'session'               => 'Ethna_Session',
+               'sql'                   => 'Ethna_AppSQL',
+               'view'                  => 'Ethna_ViewClass',
        );
 
        /**
@@ -236,8 +247,9 @@ class {$project_id}_Controller extends Ethna_Controller
                 * $smarty->assign_by_ref('session_id', session_id());
                 *
                 * // ¥í¥°¥¤¥ó¥Õ¥é¥°(true/false)
-                * if ($this->session->isStart()) {
-                *      $smarty->assign_by_ref('login', $this->session->isStart());
+                * $session =& $this->getClassFactory('session');
+                * if ($session && $this->session->isStart()) {
+                *      $smarty->assign_by_ref('login', $session->isStart());
                 * }
                 */
        }