public function getAllOptions(array $overrides = [])
    {
        $options = $this->options;

        foreach ($this->encoders as $encoder) {
            $options += $encoder->getDefaultOptions();
        }

        foreach ($overrides as $name => $value) {
            if (!array_key_exists($name, $options)) {
                throw new InvalidOptionException(sprintf("Invalid encoder option '%s'", $name));
            }

            $options[$name] = $value;
        }

        ksort($options);

        return $options;
    }