src/Console/CommandFactory.php
public function generateCommands(array $classes = [])
    {
        $classes  = $this->readApis($classes);
        $token    = $this->token->read();
        $commands = [];

        foreach ($classes as $class) {
            $api = new \ReflectionClass($class);

            foreach ($api->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
                if (0 !== strpos($method->getName(), '__')) { //skip magics
                    $command                       = $this->generateCommand($api->getShortName(), $method, $token);
                    $commands[$command->getName()] = $command;
                }
            }
        }

        return $commands;
    }
public function generateCommands(array $classes = [])
    {
        $classes  = $this->readApis($classes);
        $token    = $this->token->read();
        $commands = [];

        foreach ($classes as $class) {
            $api = new \ReflectionClass($class);

            foreach ($api->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
                if (0 !== strpos($method->getName(), '__')) { //skip magics
                    $command                       = $this->generateCommand($api->getShortName(), $method, $token);
                    $commands[$command->getName()] = $command;
                }
            }
        }

        return $commands;
    }
public function generateCommands ( array $ classes = [ ] ) { $ classes = $ this -> readApis ( $ classes ) ; $ token = $ this -> token -> read ( ) ; $ commands = [ ] ; foreach ( $ classes as $ class ) { $ api = new \ ReflectionClass ( $ class ) ; foreach ( $ api -> getMethods ( \ ReflectionMethod :: IS_PUBLIC ) as $ method ) { if ( 0 !== strpos ( $ method -> getName ( ) , '__' ) ) { //skip magics $ command = $ this -> generateCommand ( $ api -> getShortName ( ) , $ method , $ token ) ; $ commands [ $ command -> getName ( ) ] = $ command ; } } } return $ commands ; }
generates Commands from all Api Methods.

@param array $classes

@return Command[]
generates Commands from all Api Methods .