$value]; foreach ($key as $k => $v) { $this->details[$k] = $v; } return $this; } /** * Retrieve detail using its name * * @param $name * @return string|null */ public function getDetail($name) { return $this->details[$name] ?? null; } /** * Get the value of details */ public function getDetails() : array { return $this->details; } }