GetOptionKit\OptionCollection::getShortOption PHP Méthode

getShortOption() public méthode

public getShortOption ( $name )
    public function getShortOption($name)
    {
        return isset($this->shortOptions[$name]) ? $this->shortOptions[$name] : null;
    }

Usage Example

 public function testAddOption()
 {
     $opts = new OptionCollection();
     $opts->add($o = new Option('v|verbose'));
     $this->assertSame($o, $opts->getLongOption('verbose'));
     $this->assertSame($o, $opts->getShortOption('v'));
 }