Esempio n. 1
0
 public function doLoading($path)
 {
     $classes = [];
     $path = Dir::formatPath($path);
     $files = Dir::glob($path, '*.php', false);
     return $classes;
 }
Esempio n. 2
0
File: Config.php Progetto: 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);
 }
Esempio n. 3
0
 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');
 }
Esempio n. 4
0
 public static function load()
 {
     $dir = __DIR__ . '/Command/';
     $files = Dir::glob($dir, '*.php');
     if (!$files) {
         return false;
     }
     ClassLoader::loadFiles($files);
     return true;
 }