public function loadConfig($default = false, $mode = null, $verbose = false) { // Load config $config = new Digitalus_Installer_Config($default, $mode); $this->_setPathToConfig($config->getPathToConfig()); $configError = false; if (!$config->isReadable()) { if (true == (bool) $verbose) { $this->addError('Could not load config file (' . $this->getPathToConfig() . ')'); } $configError = true; } if (!$config->isWritable()) { if (true == (bool) $verbose) { $this->addError('Could not write to config file (' . $this->getPathToConfig() . ')'); } $configError = true; } if (!$configError && $config->loadFile()) { if (true == (bool) $verbose) { $this->addMessage('Successfully loaded and tested site configuration'); } } else { if (true == (bool) $verbose) { $this->addError('Site configuration could not be loaded'); } } return $config; }