public function setConfigFolder($config_folder) { if (!$config_folder) { throw new \Exception("Empty config folder path"); } $_config_folder_realpath = realpath($config_folder); if ($_config_folder_realpath && is_dir($_config_folder_realpath) && is_readable($_config_folder_realpath)) { $this->_config_array = array(); $this->_config_folder = $_config_folder_realpath . DIRECTORY_SEPARATOR; $_namespaces = $this->application['namespaces']; if (is_array($_namespaces)) { \Framework\Loader::registerNamespaces($_namespaces); } } else { throw new \Exception("Config directory read error: " . $config_folder); } }
public function setConfigFolder($configFolder) { if (!$configFolder) { throw new \Exception("Empty config folder path."); } $realConfFolder = realpath($configFolder); if ($realConfFolder != FALSE && is_dir($realConfFolder) && is_readable($realConfFolder)) { $this->configArray = array(); $this->configFolder = $realConfFolder . DIRECTORY_SEPARATOR; $ns = $this->app['namespaces']; if (is_array($ns)) { \Framework\Loader::registerNamespaces($ns); } } else { throw new \Exception("Error Processing Request"); } }