| 1 | <?php |
||
| 21 | class ContainerDecoderProvider implements DecoderProviderInterface |
||
| 22 | { |
||
| 23 | private $container; |
||
| 24 | private $decoders; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor. |
||
| 28 | * |
||
| 29 | * @param ContainerInterface $container The container from which the actual decoders are retrieved |
||
| 30 | * @param array $decoders List of key (format) value (service ids) of decoders |
||
| 31 | */ |
||
| 32 | 30 | public function __construct(ContainerInterface $container, array $decoders) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 10 | public function supports($format) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | 7 | public function getDecoder($format) |
|
| 59 | } |
||
| 60 |