data[$key] = $value; } /** * Check if container has category * @param string $key * @return bool */ public function has(string $key) { return isset($this->data[$key]); } /** * Get category from container * @param string $key * @return ItemsContainer * @throws RegistryException */ public function get(string $key) { if(!$this->has($key)) { throw new RegistryException('Category not found in registry of shown items'); } return $this->data[$key]; } }