public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('argentum_feed.factory')) {
            return;
        }

        $definition = $container->getDefinition('argentum_feed.factory');

        $taggedFeeds = $container->findTaggedServiceIds('argentum_feed.feed');
        foreach ($taggedFeeds as $id => $tags) {
            foreach ($tags as $attributes) {
                if (empty($attributes['alias'])) {
                    throw new \InvalidArgumentException(
                        sprintf(
                            'The alias is not defined in the "argentum_feed.feed" tag for the service "%s"',
                            $id
                        )
                    );
                }
                $definition->addMethodCall('addFeed', array($attributes['alias'], new Reference($id)));
            }
        }
    }
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition('argentum_feed.factory')) {
            return;
        }

        $definition = $container->getDefinition('argentum_feed.factory');

        $taggedFeeds = $container->findTaggedServiceIds('argentum_feed.feed');
        foreach ($taggedFeeds as $id => $tags) {
            foreach ($tags as $attributes) {
                if (empty($attributes['alias'])) {
                    throw new \InvalidArgumentException(
                        sprintf(
                            'The alias is not defined in the "argentum_feed.feed" tag for the service "%s"',
                            $id
                        )
                    );
                }
                $definition->addMethodCall('addFeed', array($attributes['alias'], new Reference($id)));
            }
        }
    }
public function process ( ContainerBuilder $ container ) { if ( ! $ container -> hasDefinition ( 'argentum_feed.factory' ) ) { return ; } $ definition = $ container -> getDefinition ( 'argentum_feed.factory' ) ; $ taggedFeeds = $ container -> findTaggedServiceIds ( 'argentum_feed.feed' ) ; foreach ( $ taggedFeeds as $ id => $ tags ) { foreach ( $ tags as $ attributes ) { if ( empty ( $ attributes [ 'alias' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The alias is not defined in the "argentum_feed.feed" tag for the service "%s"' , $ id ) ) ; } $ definition -> addMethodCall ( 'addFeed' , array ( $ attributes [ 'alias' ] , new Reference ( $ id ) ) ) ; } } }
Modifies the container before it is dumped to PHP code.

@param ContainerBuilder $container

@throws \InvalidArgumentException
Modifies the container before it is dumped to PHP code .