private function __construct()
 {
     set_exception_handler(array($this, '_exceptionHandler'));
     \SoftUni\FMK\Loader::registerNamespace('SoftUni\\FMK', dirname(__FILE__) . DIRECTORY_SEPARATOR);
     \SoftUni\FMK\Loader::registerAutoLoad();
     $this->_config = \SoftUni\FMK\Config::getInstance();
     if ($this->_config->getConfigFolder() == null) {
         $this->setConfigFolder('../Config');
     }
 }
 public function setConfigFolder($configFolder)
 {
     if (!$configFolder) {
         throw new \Exception('Empty Config folder path.');
     }
     $_configFolder = realpath($configFolder);
     if ($_configFolder != FALSE && is_dir($_configFolder) && is_readable($_configFolder)) {
         //clear old Config data
         $this->_configArray = array();
         $this->_configFolder = $_configFolder . DIRECTORY_SEPARATOR;
         $namespaces = $this->app['namespaces'];
         if (is_array($namespaces)) {
             \SoftUni\FMK\Loader::registerNamespaces($namespaces);
         }
     } else {
         throw new \Exception('Config directory read error: ' . $configFolder);
     }
 }