src/Persister/PersisterRegistry.php
public function getPersister($index, $type)
    {
        if (!isset($this->persisters[$index][$type])) {
            throw new \InvalidArgumentException(sprintf('No persister was registered for index "%s" and type "%s".', $index, $type));
        }

        return $this->container->get($this->persisters[$index][$type]);
    }
public function getPersister($index, $type)
    {
        if (!isset($this->persisters[$index][$type])) {
            throw new \InvalidArgumentException(sprintf('No persister was registered for index "%s" and type "%s".', $index, $type));
        }

        return $this->container->get($this->persisters[$index][$type]);
    }
Gets the persister for an index and type.

@param string $index
@param string $type

@return ObjectPersisterInterface

@throws \InvalidArgumentException if no persister was registered for the index and type