18 private $dataArray = [];
23 private $objectManager;
46 $key = $instanceName .
'-' . $categoryId;
47 if (!isset($this->dataArray[$key])) {
48 $instance = $this->objectManager->create(
51 'category' => $categoryId
55 throw new \InvalidArgumentException(
56 $instanceName .
' does not implement interface ' . HashMapInterface::class
59 $this->dataArray[$key] = $instance;
61 return $this->dataArray[$key];
71 public function resetMap($instanceName, $categoryId)
73 $key = $instanceName .
'-' . $categoryId;
74 if (isset($this->dataArray[$key])) {
75 $this->dataArray[$key]->resetData($categoryId);
76 unset($this->dataArray[$key]);
__construct(ObjectManagerInterface $objectManager)
resetMap($instanceName, $categoryId)
getDataMap($instanceName, $categoryId)