コード例 #1
0
ファイル: Autoload.php プロジェクト: andho/simdal
 public static function setDomainDirectory($dir)
 {
     $simdal_dir = $dir . DIRECTORY_SEPARATOR . '.simdal';
     if (!is_dir($simdal_dir)) {
         throw new Exception($simdal_dir . ' is not a valid directory');
     }
     $real_path = realpath($dir);
     if (!is_readable($simdal_dir)) {
         throw new Exception($simdal_dir . ' is not readable');
     }
     if (!is_writable($simdal_dir)) {
         throw new Exception($simdal_dir . ' is not writable');
     }
     self::$_domainDir = $real_path;
     if (!is_dir(self::getConfigDirectory())) {
         throw new Exception('The path ' . $dir . ' does not contain SimDAL configuration folder');
     }
 }