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

getOptions() public method

Returns all options of the format.
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

示例#1
0
 /**
  * Returns all options added to the builder.
  *
  * @param bool $includeBase 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;
 }
All Usage Examples Of Webmozart\Console\Api\Args\Format\ArgsFormat::getOptions