/** * Adds a converter. * * @param \Yosymfony\Spress\Core\ContentManager\Converter\ConverterInterface $converter The converter. * * @throws RuntimeException If invalid priority at the converter. */ public function addConverter(ConverterInterface $converter) { $priority = $converter->getPriority(); if (false === (is_int($priority) && $priority >= 0 && $priority <= 10)) { throw new \InvalidArgumentException(sprintf('Invalid priority at the converter: "%s".', get_class($converter))); } $this->queue->insert($converter, $priority); }