Webmozart\Console\Api\Config\Config::getOptions PHP Method

getOptions() public method

Read {@link Option} for a more detailed description of console options.
See also: addOption()
public getOptions ( ) : Option[]
return Webmozart\Console\Api\Args\Format\Option[] The configured options.
    public function getOptions()
    {
        return $this->formatBuilder->getOptions();
    }

Usage Example

Example #1
0
 public function testAddOption()
 {
     $this->config->addOption('option1', 'o', Option::REQUIRED_VALUE, 'Description 1');
     $this->config->addOption('option2', 'p', Option::OPTIONAL_VALUE, 'Description 2', 'Default');
     $this->assertEquals(array('option1' => new Option('option1', 'o', Option::REQUIRED_VALUE, 'Description 1'), 'option2' => new Option('option2', 'p', Option::OPTIONAL_VALUE, 'Description 2', 'Default')), $this->config->getOptions());
 }