data = $data; } public function setData(array $data) { $this->data = $data; } /** * Get a parameter or parameters by key. Key can be a string or array path. */ public function get(string $entityType, $key = null, $default = null) { if (!array_key_exists($entityType, $this->data)) { return null; } $data = $this->data[$entityType]; if (!$key) return $data; return Util::getValueByKey($data, $key, $default); } /** * Whether an entity type is available. */ public function has(string $entityType) : bool { if (!array_key_exists($entityType, $this->data)) { return false; } return true; } }