errors[] = $error_string; $this->success = false; } public function success(): bool { return $this->success; } public function html_error_list(): string { if ($this->success) return ""; if (count($this->errors) > 1) { $result = '
Please check the following problems:
'; trigger_error($this->html_error_list()); } } }