public function doLoading($path) { $classes = []; $path = Dir::formatPath($path); $files = Dir::glob($path, '*.php', false); return $classes; }
public static function setConfigPath($path) { if (!$path || !is_dir($path)) { throw new InvalidArgument('invalid path for Config ' . $path); } self::$configPath = Dir::formatPath($path); }
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'); }
public static function load() { $dir = __DIR__ . '/Command/'; $files = Dir::glob($dir, '*.php'); if (!$files) { return false; } ClassLoader::loadFiles($files); return true; }