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; }
/** * 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; }