Ejemplo n.º 1
0
 /**
  * Load paths of additional components.
  * @return void
  */
 public static function initialize()
 {
     if ($paths = self::getPaths() and !empty($paths)) {
         Exido::setIncludePaths($paths);
     }
     // Load components configurations
     foreach (Exido::config('component') as $name_space => $path) {
         // Get component configuration
         $config = Exido::config($name_space);
         // Set name
         $config['ui_name'] = isset($config['ui_name']) ? $config['ui_name'] : $name_space;
         // Assign component configuration
         self::$_components[$name_space] = $config ? (array) $config : self::$default_config;
         // Set component paths
         self::$_components[$name_space]['paths'] = array(1 => COMPATH . $path . '/', 2 => COMPATH . $path . '/' . strtolower(EXIDO_ENVIRONMENT_NAME) . '/');
     }
 }
Ejemplo n.º 2
0
// Load framework base functions
include_once 'base.php';
// Set the PHP error reporting level.
// @see  http://php.net/error_reporting
error_reporting(E_ALL & ~E_DEPRECATED);
// Check if an installation folder is exists
//if(file_exists(APPPATH.'install/index.php')) {
//include_once APPPATH.'install/index.php';
//}
// Set error handlers
set_error_handler(array('Exception_Exido', 'handlerError'));
set_exception_handler(array('Exception_Exido', 'handlerException'));
// Initialize framework
Exido::initialize();
// Load basic include paths
Exido::setIncludePaths();
// You can attach a log writer by uncomment next line
//Exido::$log->attach(new Log_File(APPPATH.'data/cache/log'));
// Load additional components
Component::load();
// Initialize loaded components
Component::initialize();
// Include internalization languages
//Exido::$i18n->attach(new I18n_File('en_US'));
Exido::$i18n->attach(new I18n_File('ru_RU'));
// Set application time zone. Depends on language loaded.
// It's UTC default.
// @see  http://php.net/timezones
date_default_timezone_set(__('__time_zone'));
// Set application locale. Depends on language loaded.
// It's en_US.UTF-8 by default.