public function __construct(RoutableInterface $entity) { parent::__construct(sprintf('Route for entity of type "%s" and identifier "%s" was not created.', get_class($entity), $entity->getId())); $this->entity = $entity; }