コード例 #1
0
ファイル: boot.php プロジェクト: BGCX261/zoombi-svn-to-git
 /**
  * Boot framework
  * @param string $a_application
  * @return bool
  */
 public static final function boot($a_application)
 {
     $i = Zoombi::getInstance();
     $path = realpath((string) $a_application);
     if (!file_exists($path)) {
         throw new Exception("Application path not exist: '{$path}'");
     }
     if (!is_dir($path)) {
         throw new Exception("Application directory not exist: '{$path}'");
     }
     $i->m_application_base = $path;
     $i->m_base_dir = realpath(dirname($_SERVER['PHP_SELF']));
     Zoombi::import('zoombi.base.registry');
     Zoombi::import('zoombi.base.config');
     Zoombi::import('zoombi.base.controller');
     //Zoombi::import('zoombi.base.action');
     Zoombi::import('zoombi.base.model');
     Zoombi::import('zoombi.base.view');
     Zoombi::import('zoombi.class.route');
     Zoombi::import('zoombi.base.router');
     Zoombi::import('zoombi.error.profiler');
     //Zoombi::import('zoombi.language.language');
     Zoombi::import('zoombi.net.headers');
     Zoombi::import('zoombi.event.dispatcher');
     Zoombi::import('zoombi.plugin.plugin');
     Zoombi::import('zoombi.plugin.pluginmanager');
     //Zoombi::import('zoombi.document.document');
     Zoombi::import('zoombi.base.application');
     /* $filename = 'bootstrap.php';
     		  $filepath = $path . Zoombi::DS . $filename;
     
     		  if( !file_exists($filepath) )
     		  throw new Exception("Application bootstrap path not exist: '{$filepath}'");
     
     		  if( !is_file($filepath) )
     		  throw new Exception("Application bootstrap directory not exist: '{$filepath}'");
     
     		  if( !is_readable($filepath) )
     		  throw new Exception("Application bootstrap file not readable: '{$filepath}'");
     
     		  $ret = include_once($filepath);
     		  if( $ret != 1 )
     		  throw new Exception("Application bootstrap error"); */
     return true;
 }
コード例 #2
0
ファイル: boot.php プロジェクト: BGCX261/zoombi-svn-to-git
 /**
  * Boot framework
  * @param string $a_application
  * @return bool
  */
 public static final function boot($a_application)
 {
     $i = Zoombi::getInstance();
     $path = realpath((string) $a_application);
     if (!file_exists($path)) {
         throw new Exception("Application path not exist: '{$path}'");
     }
     if (!is_dir($path)) {
         throw new Exception("Application directory not exist: '{$path}'");
     }
     $i->m_application_base = $path;
     Zoombi::import('zoombi.base.registry');
     Zoombi::import('zoombi.base.config');
     Zoombi::import('zoombi.base.controller');
     //Zoombi::import('zoombi.base.action');
     Zoombi::import('zoombi.base.model');
     Zoombi::import('zoombi.base.view');
     Zoombi::import('zoombi.class.route');
     Zoombi::import('zoombi.base.router');
     Zoombi::import('zoombi.error.profiler');
     Zoombi::import('zoombi.net.headers');
     Zoombi::import('zoombi.event.dispatcher');
     Zoombi::import('zoombi.plugin.plugin');
     Zoombi::import('zoombi.plugin.pluginmanager');
     Zoombi::import('zoombi.base.application');
     return true;
 }