Bluz\Config\Config::setPath PHP Method

setPath() public method

Set path to configuration files
public setPath ( string $path ) : void
$path string
return void
    public function setPath($path)
    {
        if (!is_dir($path)) {
            throw new ConfigException('Configuration directory is not exists');
        }
        $this->path = rtrim($path, '/');
    }

Usage Example

Example #1
0
 /**
  * Init instance
  *
  * @return Instance
  */
 protected static function initInstance()
 {
     $instance = new Instance();
     $instance->setPath(Application::getInstance()->getPath());
     $instance->setEnvironment(Application::getInstance()->getEnvironment());
     $instance->init();
     return $instance;
 }
All Usage Examples Of Bluz\Config\Config::setPath