| @@ 74-89 (lines=16) @@ | ||
| 71 | * @param TileInterface $tile |
|
| 72 | * @param SpecificationInterface $specification |
|
| 73 | */ |
|
| 74 | private function applyProcessors( |
|
| 75 | TileInterface $tile, |
|
| 76 | SpecificationInterface $specification |
|
| 77 | ) { |
|
| 78 | foreach ($this->processors as $processors) { |
|
| 79 | foreach ($processors as $processor) { |
|
| 80 | $context = [ |
|
| 81 | 'tile' => $tile->getPosition(), |
|
| 82 | 'processor' => $processor |
|
| 83 | ]; |
|
| 84 | $template = 'Applying processor {processor} to tile {tile}'; |
|
| 85 | $this->logger->debug($template, $context); |
|
| 86 | $processor->process($tile, $specification); |
|
| 87 | } |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * @param TileInterface $tile |
|
| @@ 95-108 (lines=14) @@ | ||
| 92 | * @param TileInterface $tile |
|
| 93 | * @param SpecificationInterface $specification |
|
| 94 | */ |
|
| 95 | private function notifyListeners( |
|
| 96 | TileInterface $tile, |
|
| 97 | SpecificationInterface $specification |
|
| 98 | ) { |
|
| 99 | foreach ($this->listeners as $listener) { |
|
| 100 | $context = [ |
|
| 101 | 'tile' => $tile->getPosition(), |
|
| 102 | 'listener' => $listener |
|
| 103 | ]; |
|
| 104 | $template = 'Applying listener {listener} to tile {tile}'; |
|
| 105 | $this->logger->debug($template, $context); |
|
| 106 | $listener->accept($tile, $specification); |
|
| 107 | } |
|
| 108 | } |
|
| 109 | ||
| 110 | /** |
|
| 111 | * @param ProcessorInterface $processor |
|