Skip to content

Commit

Permalink
Initialize class members in App\Page
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPetovan committed Nov 29, 2019
1 parent 0191f52 commit 25194b5
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions src/App/Page.php
Expand Up @@ -30,15 +30,26 @@ class Page implements ArrayAccess
/**
* @var array Contains all stylesheets, which should get loaded during page
*/
private $stylesheets;
private $stylesheets = [];
/**
* @var array Contains all scripts, which are added to the footer at last
*/
private $footerScripts;
private $footerScripts = [];
/**
* @var array The page content, which are showed directly
*/
private $page;
private $page = [
'aside' => '',
'bottom' => '',
'content' => '',
'footer' => '',
'htmlhead' => '',
'nav' => '',
'page_title' => '',
'right_aside' => '',
'template' => '',
'title' => '',
];
/**
* @var string The basepath of the page
*/
Expand All @@ -50,19 +61,6 @@ class Page implements ArrayAccess
public function __construct(string $basepath)
{
$this->basePath = $basepath;

$this->page = [
'aside' => '',
'bottom' => '',
'content' => '',
'footer' => '',
'htmlhead' => '',
'nav' => '',
'page_title' => '',
'right_aside' => '',
'template' => '',
'title' => ''
];
}

/**
Expand Down

0 comments on commit 25194b5

Please sign in to comment.