private function registerTaggedTransformation(ContainerBuilder $container, Definition $definition, $tag, $callable)
    {
        $taggedServices = $container->findTaggedServiceIds($tag);

        foreach ($taggedServices as $id => $tags) {
            foreach ($tags as $attributes) {
                $definition->addMethodCall(
                    $callable,
                    array(
                        $attributes["alias"],
                        $attributes["endpoint"],
                        new Reference($id)
                    )
                );
            }
        }
    }