public function import($resource, $slot = null, $type = null)
    {
        if (null === $slot) {
            $slot = $this->defaultSlot;
        }

        if (null === $slot) {
            throw new \InvalidArgumentException(sprintf('No slot provided for resource "%s".', $resource));
        }

        $hash = sha1($slot.'~'.$resource.($type ? '~'.$type : ''));

        $this->container->register(RouteAutowiringExtension::EXTENSION_ALIAS.'.'.$hash, RouteResource::class)
            ->setPublic(false)
            ->setArguments([$resource, $type])
            ->addTag(RouteAutowiringPass::TAG_NAME, ['slot' => $slot]);

        return $this;
    }