Whitespace cleanup

This commit is contained in:
Erik Thuning 2022-07-27 10:48:53 +02:00
parent 1d0caf9513
commit 22d760a0af

@ -1,7 +1,7 @@
<?php <?php
abstract class Page extends Responder { abstract class Page extends Responder {
protected abstract function render_body(); protected abstract function render_body();
protected $page = 'checkout'; protected $page = 'checkout';
protected $title = "DSV Utlåning"; protected $title = "DSV Utlåning";
protected $subtitle = ''; protected $subtitle = '';
@ -15,11 +15,11 @@ abstract class Page extends Responder {
'history' => 'Historik', 'history' => 'Historik',
'search' => 'Sök'); 'search' => 'Sök');
private $template_parts = array(); private $template_parts = array();
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
$this->template_parts = get_fragments('./html/base.html'); $this->template_parts = get_fragments('./html/base.html');
if(isset($_GET['page'])) { if(isset($_GET['page'])) {
$this->page = $_GET['page']; $this->page = $_GET['page'];
} }
@ -27,7 +27,7 @@ abstract class Page extends Responder {
$this->subtitle = $this->menuitems[$this->page]; $this->subtitle = $this->menuitems[$this->page];
} }
} }
public function render() { public function render() {
$this->render_head(); $this->render_head();
$this->render_body(); $this->render_body();
@ -36,7 +36,7 @@ abstract class Page extends Responder {
} }
$this->render_foot(); $this->render_foot();
} }
final private function render_head() { final private function render_head() {
$headtitle = $this->title; $headtitle = $this->title;
$pagetitle = $this->title; $pagetitle = $this->title;
@ -83,7 +83,7 @@ abstract class Page extends Responder {
'message' => $this->error), 'message' => $this->error),
$this->fragments['message'])); $this->fragments['message']));
} }
final private function render_foot() { final private function render_foot() {
print($this->template_parts['foot']); print($this->template_parts['foot']);
} }