src/Console/ConsoleOptionParser.php
public function getConsoleOption($name)
    {
        if (isset($this->options[$name])) {
            return $this->options[$name];
        }

        foreach ($this->options as $option) {
            $longName  = $option->getLongName();
            $shortName = $option->getShortName();

            if ($name == $longName || $name == $shortName) {
                return $option;
            }
        }
    }
public function getConsoleOption($name)
    {
        if (isset($this->options[$name])) {
            return $this->options[$name];
        }

        foreach ($this->options as $option) {
            $longName  = $option->getLongName();
            $shortName = $option->getShortName();

            if ($name == $longName || $name == $shortName) {
                return $option;
            }
        }
    }
public function getConsoleOption ( $ name ) { if ( isset ( $ this -> options [ $ name ] ) ) { return $ this -> options [ $ name ] ; } foreach ( $ this -> options as $ option ) { $ longName = $ option -> getLongName ( ) ; $ shortName = $ option -> getShortName ( ) ; if ( $ name == $ longName || $ name == $ shortName ) { return $ option ; } } }
Returns the ConsoleOption object either found at the key with the supplied
name, or whose short name or long name matches.

@param  string        $name The name, shortName, or longName of the option
@return ConsoleOption The option matching the supplied name, if it exists
Returns the ConsoleOption object either found at the key with the supplied name or whose short name or long name matches .