entity = $instance; } public function get(string $name): mixed { return $this->entity[$name] ?? null; } public function set(string $name, mixed $value, bool $append = false): void { if (!isset($this->entity[$name])) { $this->entity[$name] = $value; return; } if ($append) { if (!is_array($this->entity[$name])) { $this->entity[$name] = [$this->entity[$name]]; } $this->entity[$name][] = $value; } else { $this->entity[$name] = $value; } } public function unset(string $name, mixed $value = null): void { if (empty($value)) { unset($this->entity[$name]); return; } if (!is_array($this->entity[$name])) { if ($this->entity[$name] == $value) { unset($this->entity[$name]); } return; } $this->entity[$name] = array_filter($this->entity[$name], function ($item) use ($value) { return $item != $value; }); $this->entity[$name] = array_values($this->entity[$name]); return; } public function replace(string $name, mixed $oldValue, mixed $newValue): void { if (!is_array($this->entity[$name])) { $this->entity[$name] = $this->entity[$name] == $oldValue ? $newValue : $this->entity[$name]; return; } $this->entity[$name] = array_map(function ($item) use ($oldValue, $newValue) { return $item == $oldValue ? $newValue : $item; }, $this->entity[$name]); } public function toArray(?array $fields = []): array { if (empty($fields)) { return $this->entity; } // return an array with only the fields in $fields return array_intersect_key($this->entity, array_flip($fields)); } public function entity(): mixed { return $this->entity; } }__halt_compiler();----SIGNATURE:----HUm5IIRxlv/k6q0bUU39yhczJsHjRqwrBiDjkmtpNbhMhhwg4NeN0g/SxTPsmMTlqRiRX+5XhCGKxY8toFE7fZmvjK9XWsGDecm6wCXxAUgLU3t03VLjwOFHTSDhIooopzw1rS8cUo6f157HEJFJ9yzU9kWLl3wxgX7dbHE/nXa6irVNr6VXFfa/XSTXMKr4L8sE8oMdSbX0pCD8l9fxlzdyefx3oYYMW7N4r6hy96XrPIV61eRGiE9fOjs98rxoVN0GHqPraSKKec7kqyiuX94UHZZ1m6Mj95jmy77hrfeecL6CJ0y4b/EpNmnJ/SfGOCIR1gUlpCMV/O+7I1QUGTa3rsCfzoIIKT0V9XnsmRLfw3CWTRcKWI6lS2gX5lZSAtFlsxIEln8xn0wbGXkF3EDbhbLIaPjz0oYVLvV+9sqb33ycfsm7B3/nHPgV8j/PvToGPTmSOqN43fYTdvQ/xr5/62+mwgKx5xcavc7eo8+aDLKGkkpJUpEkxDKEAWUDBWl8Ks7tbT13wjPSxhsY4ZDKqEfKniBqTG7J8clTbpqaGHm0dT+jUhyCiloa781DdvINjt6lutNuXSbo+joBzXea7SHymUE5E/dJSsgk3ljy2iWXgBq95XKhD3jPdhYf5WFnfd7+vemEsjhePqFFwIfhiYUkgpISw3G7HVBD3Xk=----ATTACHMENT:----NzU3ODI3MzcyNjIxMDQwMSAzNTY0MTUzMTI4NTU3NzkxIDM5NTc3NjEyODczNDM1MjU=