data = $data; } static function __set_state(array $data): self { $array = new static(); foreach ($data as $key => $value) { $array->$key = $value; } return $array; } function _haveMethod(string $method): bool { return method_exists($this, $method); } }