protected function getDefaultModuleList() { $list = parent::getDefaultModuleList(); $list['config'] = 'SiteCommandLineConfigModule'; $list['database'] = 'SiteDatabaseModule'; $list['instance'] = 'SiteMultipleInstanceModule'; return $list; }
/** * Configures modules of this application before they are initialized * * @param SiteConfigModule $config the config module of this application to * use for configuration other modules. */ protected function configure(SiteConfigModule $config) { parent::configure($config); if (isset($config->exceptions->log_location)) { SwatException::setLogger(new SiteExceptionLogger($config->exceptions->log_location, $config->exceptions->base_uri)); } if (isset($config->errors->log_location)) { SwatError::setLogger(new SiteErrorLogger($config->errors->log_location, $config->errors->base_uri)); } if ($config->date->time_zone !== null) { $this->default_time_zone = new DateTimeZone($config->date->time_zone); } $this->default_locale = $config->i18n->locale; setlocale(LC_ALL, $config->i18n->locale . '.UTF-8'); $this->memcache->server = $config->memcache->server; $this->memcache->app_ns = $config->memcache->app_ns; }
/** * Configures modules of this application before they are initialized * * @param SiteConfigModule $config the config module of this application to * use for configuration other modules. */ protected function configure(SiteConfigModule $config) { parent::configure($config); $this->database->dsn = $config->database->dsn; }