src/CommandFactory.php
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;
    }
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;
    }
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 ; }
Get classes that implements the Command interface

@param string $namespace
@param string $path

@return array
Get classes that implements the Command interface