| @@ 83-85 (lines=3) @@ | ||
| 80 | { |
|
| 81 | foreach ($events as $id => $event) { |
|
| 82 | $this->validateTaggedService($container, $id); |
|
| 83 | if (!isset($event[0]['event'])) { |
|
| 84 | throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, self::LISTENER_TAG)); |
|
| 85 | } |
|
| 86 | if (!isset($event[0]['method'])) { |
|
| 87 | throw new \InvalidArgumentException(sprintf('Service "%s" must define the "method" attribute on "%s" tags.', $id, self::LISTENER_TAG)); |
|
| 88 | } |
|
| @@ 86-88 (lines=3) @@ | ||
| 83 | if (!isset($event[0]['event'])) { |
|
| 84 | throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, self::LISTENER_TAG)); |
|
| 85 | } |
|
| 86 | if (!isset($event[0]['method'])) { |
|
| 87 | throw new \InvalidArgumentException(sprintf('Service "%s" must define the "method" attribute on "%s" tags.', $id, self::LISTENER_TAG)); |
|
| 88 | } |
|
| 89 | $dispatcher->addMethodCall('addListener', [$event[0]['event'], [new Reference($id), $event[0]['method']]]); |
|
| 90 | } |
|
| 91 | } |
|
| @@ 46-48 (lines=3) @@ | ||
| 43 | $parser = $container->findDefinition(self::LDIF_PARSER); |
|
| 44 | ||
| 45 | foreach ($urlLoaders as $id => $loader) { |
|
| 46 | if (!isset($loader[0]['type'])) { |
|
| 47 | throw new \InvalidArgumentException(sprintf('Service "%s" must define the "type" attribute on "%s" tags.', $id, self::LDIF_URL_LOADER_TAG)); |
|
| 48 | } |
|
| 49 | $parser->addMethodCall('setUrlLoader', [$loader[0]['type'], new Reference($id)]); |
|
| 50 | } |
|
| 51 | } |
|