コード例 #1
0
ファイル: Settings.php プロジェクト: aeberh/php-movico
 public function __construct()
 {
     $config = new ConfigurationFile(ConfigurationConstants::MAIN_CONFIG);
     $this->title = $config->getParam("title", "")->getValue();
     $this->environment = $config->getParam("environment", "prod")->getValue();
     $this->ajaxEnabled = $config->getParam("ajax_enabled", "true")->getValue();
     $this->ajaxTimeout = $config->getParam("ajax_timeout", "3000")->getValue();
     $this->defaultUrl = $config->getParam("default_url", "index")->getValue();
     $this->errorPage = $config->getParam("error_page", "error")->getValue();
     $this->contextPath = $config->getParam("context_path", "/")->getValue();
     $this->locale = $config->getParam("locale", "en_US")->getValue();
     $this->timezone = $config->getParam("timezone", "Europe/Brussels")->getValue();
     $this->gmapsApiKey = $config->getParam("gmaps_api_key", "")->getValue();
     $this->viewCacheEnabled = $config->getParam("view_cache_enabled", "true")->getValue();
     $this->dbCacheEnabled = $config->getParam("db_cache_enabled", "true")->getValue();
     $this->showSql = $config->getParam("show_sql", "false")->getValue();
     $this->smtpHost = $config->getParam("smtp_host", "localhost")->getValue();
     $this->smtpPort = $config->getParam("smtp_port", "25")->getValue();
     $this->smtpUsername = $config->getParam("smtp_username", "")->getValue();
     $this->smtpPassword = $config->getParam("smtp_password", "")->getValue();
     $this->smtpDefaultFromEmail = $config->getParam("smtp_default_from_email", "")->getValue();
     $this->smtpDefaultFromName = $config->getParam("smtp_default_from_name", "")->getValue();
     $this->smtpAuth = $config->getParam("smtp_auth", "false")->getValue();
     $this->fileUploadDir = $config->getParam("file_upload_dir", "/uploads")->getValue();
 }