예제 #1
0
파일: InitLoader.php 프로젝트: vimac/zan
 public function doLoading($path)
 {
     $classes = [];
     $path = Dir::formatPath($path);
     $files = Dir::glob($path, '*.php', false);
     return $classes;
 }
예제 #2
0
파일: Config.php 프로젝트: vimac/zan
 public static function setConfigPath($path)
 {
     if (!$path || !is_dir($path)) {
         throw new InvalidArgument('invalid path for Config ' . $path);
     }
     self::$configPath = Dir::formatPath($path);
 }
예제 #3
0
파일: DirTest.php 프로젝트: vimac/zan
 public function testPathFormatWorkFine()
 {
     $path = '/tmp';
     $formatedPath = Dir::formatPath($path);
     $this->assertEquals('/tmp/', $formatedPath, 'Dir::formatPath faild');
     $path = '/tmp/';
     $formatedPath = Dir::formatPath($path);
     $this->assertEquals('/tmp/', $formatedPath, 'Dir::formatPath faild');
 }
예제 #4
0
파일: Commands.php 프로젝트: vimac/zan
 public static function load()
 {
     $dir = __DIR__ . '/Command/';
     $files = Dir::glob($dir, '*.php');
     if (!$files) {
         return false;
     }
     ClassLoader::loadFiles($files);
     return true;
 }