Commit a6e4a02b authored by Lukáš Bachleda's avatar Lukáš Bachleda

General controller

parent b1fc66bc
Pipeline #21900 canceled with stages
<php
<?php
abstract class Controller {
protected $data = array();
protected $view = "";
protected $header = array('title' => '', 'keywords' => '');
abstract function process($params);
public function renderView() {
if ($this->view)
{
extract($this->data);
require("views/" . $this->view . ".php");
}
}
public function redirect($url) {
header("Location: /$url");
header("Connection: close");
exit;
}
class Controller {
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment