$value) { $key = "_$key"; $this->$key = $value; } } public function getContentType(): ?string { return static::$contentType; } public function getOutput(): bool { return $this->_output; } public function getPassthrough(): bool { return $this->_passthrough; } abstract public function handle(\Throwable $throwable, ThrowableController $controller): bool; public function setOutput(bool $value): void { $this->_output = $value; } public function setPassthrough(bool $value): void { $this->_passthrough = $value; } protected function sendContentTypeHeader(): void { if (!isset($_SERVER['REQUEST_URI']) || headers_sent()) { return; } header('Content-Type: ' . static::$contentType); } }