private function createRequestMatcher(ContainerBuilder $container, $path = null, $host = null, $methods = array(), $ip = null, array $attributes = array())
    {
        $serialized = serialize(array($path, $host, $methods, $ip, $attributes));
        $id = 'rollerworks_multi_user.request_matcher.'.md5($serialized).sha1($serialized);

        // Matcher already exist, which is not allowed
        if (isset($this->requestMatchers[$id])) {
            throw new \RuntimeException(sprintf(
                'There is already a request-matcher for this configuration: path: "%s", host: "%s". Only one request matcher should match for the user system.',
                $path,
                $host
            ));
        }

        if ($methods) {
            $methods = array_map('strtoupper', (array) $methods);
        }

        // only add arguments that are necessary
        $arguments = array($path, $host, $methods, $ip, $attributes);
        while (count($arguments) > 0 && !end($arguments)) {
            array_pop($arguments);
        }

        $container
            ->register($id, '%rollerworks_multi_user.matcher.class%')
            ->setPublic(false)
            ->setArguments($arguments)
        ;

        return $this->requestMatchers[$id] = new Reference($id);
    }