@@ 81-90 (lines=10) @@ | ||
78 | * @return DataContainer\DataContainerInterface |
|
79 | * @throws \Nnx\JmsSerializerModule\DataContainerBuilder\Exception\RuntimeException |
|
80 | */ |
|
81 | public function getDataContainerFromCache(SimpleXMLElement $resource) |
|
82 | { |
|
83 | if (!$this->hasDataInCache($resource)) { |
|
84 | $errMsg = 'Data container not found'; |
|
85 | throw new Exception\RuntimeException($errMsg); |
|
86 | } |
|
87 | ||
88 | $uuid = $this->getUuidAttribute($resource); |
|
89 | return $this->itemNodeUuidToCacheData[$uuid]['dataContainer']; |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * Возвращает контейнер с данными для сущности |
|
@@ 100-109 (lines=10) @@ | ||
97 | * @return DataContainer\EntityInterface |
|
98 | * @throws \Nnx\JmsSerializerModule\DataContainerBuilder\Exception\RuntimeException |
|
99 | */ |
|
100 | public function getEntityFromCache(SimpleXMLElement $resource) |
|
101 | { |
|
102 | if (!$this->hasDataInCache($resource)) { |
|
103 | $errMsg = 'Entity not found'; |
|
104 | throw new Exception\RuntimeException($errMsg); |
|
105 | } |
|
106 | ||
107 | $uuid = $this->getUuidAttribute($resource); |
|
108 | return $this->itemNodeUuidToCacheData[$uuid]['entity']; |
|
109 | } |
|
110 | ||
111 | /** |
|
112 | * Подготавливает нормализованный контейнер с данными на основе узла SimpleXMLElement |