protected function getClasses($namespace, $path)
    {
        $classes = [];
        $path = "$path/Console/Command";
        if (!is_dir($path)) {
            return $classes;
        }

        $dir = new \DirectoryIterator($path);
        $classFiles = new \RegexIterator($dir, '/[a-z_]*\.php/i');
        foreach ($classFiles as $file) {
            $classes[] = str_replace('.php', '', "{$namespace}Console\\Command\\{$file}");
        }
        return $classes;
    }