|
@@ -19,12 +19,16 @@ class Message extends Page
|
|
*/
|
|
*/
|
|
public function message(string $message, bool $back = true, int $status = 404, array $headers = []): Page
|
|
public function message(string $message, bool $back = true, int $status = 404, array $headers = []): Page
|
|
{
|
|
{
|
|
- $this->nameTpl = 'message';
|
|
|
|
- $this->httpStatus = \max(200, $status);
|
|
|
|
- $this->httpHeaders = $headers;
|
|
|
|
- $this->titles = __('Info');
|
|
|
|
- $this->back = $back;
|
|
|
|
|
|
+ $this->nameTpl = 'message';
|
|
|
|
+ $this->httpStatus = \max(200, $status);
|
|
|
|
+ $this->titles = __('Info');
|
|
|
|
+ $this->back = $back;
|
|
|
|
|
|
|
|
+ if (! empty($headers)) {
|
|
|
|
+ foreach ($headers as $header) {
|
|
|
|
+ $this->header($header[0], $header[1], $header[2] ?? true);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
if ($status < 200) {
|
|
if ($status < 200) {
|
|
$type = 'i';
|
|
$type = 'i';
|