18 private $dataArray = [];
23 private $objectManager;
45 $key = $instanceName .
'-' . $categoryId;
46 if (!isset($this->dataArray[$key])) {
47 $instance = $this->objectManager->create(
50 'category' => $categoryId
54 throw new \InvalidArgumentException(
55 $instanceName .
' does not implement interface ' . DatabaseMapInterface::class
58 $this->dataArray[$key] = $instance;
60 return $this->dataArray[$key];
70 public function resetMap($instanceName, $categoryId)
72 $key = $instanceName .
'-' . $categoryId;
73 if (isset($this->dataArray[$key])) {
74 $this->dataArray[$key]->destroyTableAdapter($categoryId);
75 unset($this->dataArray[$key]);
getDataMap($instanceName, $categoryId)
resetMap($instanceName, $categoryId)
__construct(ObjectManagerInterface $objectManager)