ContainerBuilder::findTaggedServiceIds()

array findTaggedServiceIds(string $name)

Returns service ids for a given tag.

Example:

$container->register('foo')->addTag('my.tag', array('hello' => 'world'));

$serviceIds = $container->findTaggedServiceIds('my.tag'); foreach ($serviceIds as $serviceId => $tags) { foreach ($tags as $tag) { echo $tag['hello']; } }

Parameters

string $name The tag name

Return Value

array An array of tags
doc_Symfony
2016-10-28 06:11:59
Comments
Leave a Comment

Please login to continue.