private function definition(ContainerBuilder $container, $class, $tag, array $arguments = [])
    {
        $definition = new Definition(strtr(__NAMESPACE__, ['ServiceContainer' => $class]), $arguments);

        return $container
            ->setDefinition($tag . '.' . self::id($class), $definition)
            ->addTag($tag);
    }
private function definition(ContainerBuilder $container, $class, $tag, array $arguments = [])
    {
        $definition = new Definition(strtr(__NAMESPACE__, ['ServiceContainer' => $class]), $arguments);

        return $container
            ->setDefinition($tag . '.' . self::id($class), $definition)
            ->addTag($tag);
    }
private function definition ( ContainerBuilder $ container , $ class , $ tag , array $ arguments = [ ] ) { $ definition = new Definition ( strtr ( __NAMESPACE__ , [ 'ServiceContainer' => $ class ] ) , $ arguments ) ; return $ container -> setDefinition ( $ tag . '.' . self :: id ( $ class ) , $ definition ) -> addTag ( $ tag ) ; }
Define a new service in DI container.

@param ContainerBuilder $container
DI container.
@param string $class
Class in namespace of extension.
@param string $tag
Tag of the definition.
@param array $arguments
Dependency arguments.

@return Definition
Tagged definition.
Define a new service in DI container .