Flintstone\Config::setDir PHP Метод

setDir() публичный Метод

Set the dir.
public setDir ( string $dir )
$dir string
    public function setDir($dir)
    {
        if (!is_dir($dir)) {
            throw new Exception('Directory does not exist: ' . $dir);
        }
        $this->config['dir'] = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR;
    }

Usage Example

Пример #1
0
 /**
  * @expectedException Flintstone\Exception
  */
 public function testConfigInvalidDir()
 {
     $config = new Config();
     $config->setDir('/x/y/z/foo');
 }