xssbook2/web/_controller/template.php

23 lines
541 B
PHP
Raw Normal View History

2024-03-30 16:14:42 +00:00
<?php /* Copyright (c) 2024 Freya Murphy */
class Template_controller extends Controller {
// the request model
private $request_model;
function __construct($load) {
parent::__construct($load);
$this->request_model = $this->load->model('request');
}
public function toast(): void {
$data = array(
'msg' => $this->request_model->get_str('msg', FALSE),
'detail' => $this->request_model->get_str('detail', FALSE),
'hint' => $this->request_model->get_str('hint', FALSE)
);
$this->view('template/toast', $data);
}
}