1 | <?php |
||
12 | class DoctrineORMStorage implements StorageInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var \Doctrine\ORM\EntityManagerInterface |
||
16 | */ |
||
17 | protected $em; |
||
18 | |||
19 | /** |
||
20 | * @var \Doctrine\ORM\EntityRepository |
||
21 | */ |
||
22 | protected $repository; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $class; |
||
28 | |||
29 | /** |
||
30 | * @param EntityManagerInterface $em |
||
31 | * @param string $class |
||
32 | */ |
||
33 | public function __construct(EntityManagerInterface $em, $class) |
||
39 | |||
40 | /** |
||
41 | * @param string key |
||
42 | * |
||
43 | * @return mixed|null Null if the value is not found |
||
44 | */ |
||
45 | public function get($key) |
||
55 | |||
56 | /** |
||
57 | * @param string $key |
||
58 | * @param mixed $value |
||
59 | */ |
||
60 | public function set($key, $value) |
||
74 | |||
75 | /** |
||
76 | * @param string $key |
||
77 | */ |
||
78 | public function remove($key) |
||
86 | } |
||
87 |