1 | <?php |
||
21 | class CollectionsMap implements CollectionsMapInterface |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @var CacheStorageInterface |
||
26 | */ |
||
27 | protected $cache; |
||
28 | |||
29 | /** |
||
30 | * Set an entity |
||
31 | * |
||
32 | * @param string $collectionId |
||
33 | * @param EntityCollection $collection |
||
34 | * |
||
35 | * @return self|$this|CollectionsMapInterface |
||
36 | */ |
||
37 | 2 | public function set($collectionId, EntityCollection $collection) |
|
42 | |||
43 | /** |
||
44 | * Gets the entity with provided id |
||
45 | * |
||
46 | * @param string $collectionId |
||
47 | * |
||
48 | * @param null $default |
||
49 | * |
||
50 | * @return EntityCollection |
||
51 | */ |
||
52 | 2 | public function get($collectionId, $default = null) |
|
56 | |||
57 | /** |
||
58 | * Set cache storage for this identity map |
||
59 | * |
||
60 | * @param CacheStorageInterface $cache |
||
61 | * |
||
62 | * @return $this|self|CollectionsMap |
||
63 | */ |
||
64 | 6 | public function setCache(CacheStorageInterface $cache) |
|
69 | |||
70 | /** |
||
71 | * Gets cache storage for this identity map |
||
72 | * |
||
73 | * @return CacheStorageInterface |
||
74 | */ |
||
75 | 6 | public function getCache() |
|
82 | } |