public function get($name)
    {
        if (isset($this->commands[$name])) {
            return $this->commands[$name];
        }

        if (isset($this->shortNameIndex[$name])) {
            return $this->commands[$this->shortNameIndex[$name]];
        }

        if (isset($this->aliasIndex[$name])) {
            return $this->commands[$this->aliasIndex[$name]];
        }

        throw NoSuchCommandException::forCommandName($name);
    }
public function get($name)
    {
        if (isset($this->commands[$name])) {
            return $this->commands[$name];
        }

        if (isset($this->shortNameIndex[$name])) {
            return $this->commands[$this->shortNameIndex[$name]];
        }

        if (isset($this->aliasIndex[$name])) {
            return $this->commands[$this->aliasIndex[$name]];
        }

        throw NoSuchCommandException::forCommandName($name);
    }
public function get ( $ name ) { if ( isset ( $ this -> commands [ $ name ] ) ) { return $ this -> commands [ $ name ] ; } if ( isset ( $ this -> shortNameIndex [ $ name ] ) ) { return $ this -> commands [ $ this -> shortNameIndex [ $ name ] ] ; } if ( isset ( $ this -> aliasIndex [ $ name ] ) ) { return $ this -> commands [ $ this -> aliasIndex [ $ name ] ] ; } throw NoSuchCommandException :: forCommandName ( $ name ) ; }
Returns a command by its name.

@param string $name The name of the command.

@return Command The command.

@throws NoSuchCommandException If no command with that name exists in the
collection.
Returns a command by its name .