1 | <?php |
||
14 | class ConfiguredContextFactory implements SerializationContextFactoryInterface, DeserializationContextFactoryInterface |
||
15 | { |
||
16 | /** |
||
17 | * Context config |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | private $config; |
||
22 | |||
23 | /** |
||
24 | * ConfiguredContextFactory constructor. |
||
25 | * |
||
26 | * @param array $config Context configuration |
||
27 | */ |
||
28 | public function __construct(array $config) |
||
32 | |||
33 | /** |
||
34 | * @inheritDoc |
||
35 | */ |
||
36 | public function createDeserializationContext() |
||
40 | |||
41 | /** |
||
42 | * @inheritDoc |
||
43 | */ |
||
44 | public function createSerializationContext() |
||
48 | |||
49 | /** |
||
50 | * Configures context according to configuration |
||
51 | * |
||
52 | * @param Context $context The context |
||
53 | * |
||
54 | * @return Context Given object |
||
55 | */ |
||
56 | private function configureContext(Context $context) |
||
70 | } |
||
71 |