Commando\Command::__call PHP Method

__call() public method

..) it relies on this magic method. It allows us to handle some logic that is applicable across the board and also allows easy aliasing of methods (e.g. "o" for "option")... since it is a CLI library, such minified aliases would only be fitting :-).
public __call ( string $name, array $arguments ) : Command
$name string
$arguments array
return Command
    public function __call($name, $arguments)
    {
        if (empty(self::$methods[$name])) {
            throw new \Exception(sprintf('Unknown function, %s, called', $name));
        }
        // use the fully quantified name, e.g. "option" when "o"
        $name = self::$methods[$name];
        // set the option we'll be acting on
        if (empty($this->current_option) && $name !== 'option' && $name !== 'flag' && $name !== 'argument') {
            throw new \Exception(sprintf('Invalid Option Chain: Attempting to call %s before an "option" declaration', $name));
        }
        array_unshift($arguments, $this->current_option);
        $option = call_user_func_array(array($this, "_{$name}"), $arguments);
        return $this;
    }