Flintstone\Config::setDir PHP Method

setDir() public method

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
ファイル: ConfigTest.php プロジェクト: fire015/flintstone
 /**
  * @expectedException Flintstone\Exception
  */
 public function testConfigInvalidDir()
 {
     $config = new Config();
     $config->setDir('/x/y/z/foo');
 }