public function addResource(ResourceInterface $resource)
    {
        $resourceStr = (string) $resource;

        $this->container->register(RouteAutowiringExtension::EXTENSION_ALIAS.'.resources.'.sha1($resourceStr), get_class($resource))
            ->setPublic(false)
            ->setArguments([$resourceStr])
            ->addTag(RouteResourcePass::TAG_NAME);

        return $this;
    }