Webmozart\Console\Api\Args\Format\ArgsFormatBuilder::getOptions PHP Method

getOptions() public method

Returns all options added to the builder.
public getOptions ( boolean $includeBase = true ) : Option[]
$includeBase boolean Whether to include options of the base format in the result.
return Option[] The options.
    public function getOptions($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
        $options = $this->options;
        if ($includeBase && $this->baseFormat) {
            // append base options
            $options = array_replace($options, $this->baseFormat->getOptions());
        }
        return $options;
    }

Usage Example

 /**
  * @expectedException \InvalidArgumentException
  */
 public function testGetOptionsFailsIfIncludeBaseNoBoolean()
 {
     $this->builder->getOptions(1234);
 }
All Usage Examples Of Webmozart\Console\Api\Args\Format\ArgsFormatBuilder::getOptions