DependencyInjection/ONGRConnectionsExtension.php
protected function createServices(ContainerBuilder $container, $classes, $config, $tag, $method)
    {
        if (!is_array($tag)) {
            $tag = [$tag];
        }

        foreach ($classes as $class) {
            $methods = $this->getMethods($class);
            $definition = new Definition($class);
            $this->setProperties($definition, $config, $methods);
            $this->setTags($definition, $tag, $method);
            $container->setDefinition($this->getServiceName($tag[0]), $definition);
        }
    }
protected function createServices(ContainerBuilder $container, $classes, $config, $tag, $method)
    {
        if (!is_array($tag)) {
            $tag = [$tag];
        }

        foreach ($classes as $class) {
            $methods = $this->getMethods($class);
            $definition = new Definition($class);
            $this->setProperties($definition, $config, $methods);
            $this->setTags($definition, $tag, $method);
            $container->setDefinition($this->getServiceName($tag[0]), $definition);
        }
    }
Creates service definitions.

@param ContainerBuilder $container
@param string[]         $classes
@param array            $config
@param string|string[]  $tag
@param string           $method