private function getServiceListByTag($tag)
    {
        $services = [];
        $serviceIds = [];
        $serviceDefinitions = $this->container->getDefinitions();

        foreach ($tag as $tagId) {
            $serviceIds = array_merge(
                $serviceIds,
                array_keys($this->container->findTaggedServiceIds($tagId))
            );
        }

        foreach ($serviceIds as $serviceId) {
            $serviceDefinition = $serviceDefinitions[$serviceId];
            if ($serviceDefinition) {
                $services[] = [$serviceId, $serviceDefinition->getClass()];
            }
        }

        usort($services, [$this, 'compareService']);
        return $services;
    }
private function getServiceListByTag($tag)
    {
        $services = [];
        $serviceIds = [];
        $serviceDefinitions = $this->container->getDefinitions();

        foreach ($tag as $tagId) {
            $serviceIds = array_merge(
                $serviceIds,
                array_keys($this->container->findTaggedServiceIds($tagId))
            );
        }

        foreach ($serviceIds as $serviceId) {
            $serviceDefinition = $serviceDefinitions[$serviceId];
            if ($serviceDefinition) {
                $services[] = [$serviceId, $serviceDefinition->getClass()];
            }
        }

        usort($services, [$this, 'compareService']);
        return $services;
    }
private function getServiceListByTag ( $ tag ) { $ services = [ ] ; $ serviceIds = [ ] ; $ serviceDefinitions = $ this -> container -> getDefinitions ( ) ; foreach ( $ tag as $ tagId ) { $ serviceIds = array_merge ( $ serviceIds , array_keys ( $ this -> container -> findTaggedServiceIds ( $ tagId ) ) ) ; } foreach ( $ serviceIds as $ serviceId ) { $ serviceDefinition = $ serviceDefinitions [ $ serviceId ] ; if ( $ serviceDefinition ) { $ services [ ] = [ $ serviceId , $ serviceDefinition -> getClass ( ) ] ; } } usort ( $ services , [ $ this , 'compareService' ] ) ; return $ services ; }
Get service list by a tag.

@param string $tag
Tag.

@return array
Array of services.
Get service list by a tag .