FluidXml\FluidXml::mergeOptions PHP Method

mergeOptions() protected method

protected mergeOptions ( &$arguments )
    protected function mergeOptions(&$arguments)
    {
        $options = $this->defaults;
        if (\count($arguments) > 0) {
            // The root option can be specified as first argument
            // because it is the most common.
            $options['root'] = $arguments[0];
        }
        if (\count($arguments) > 1) {
            // Custom options can be specified only as second argument,
            // to avoid confusion with array to XML construction style.
            $options = \array_merge($options, $arguments[1]);
        }
        return $options;
    }