1
0
mirror of https://github.com/restoreddev/phpapprentice.git synced 2025-10-26 03:16:14 +01:00

Converted chapters to markdown and changed pages to vertical layout

This commit is contained in:
Andrew Davis
2019-01-02 20:12:35 -06:00
parent 0c17549268
commit cbd3c539bb
56 changed files with 1305 additions and 1060 deletions

View File

@@ -23,12 +23,12 @@ class Page
public $template;
/**
* Name of code file to load as table
* Name of chapter file to load and parse
* Will be skipped if none is provided
*
* @var string|null
*/
public $code;
public $chapter;
/**
* Map of data to passed to template
@@ -42,18 +42,18 @@ class Page
*
* @param string $name
* @param string|null $template
* @param string|null $code
* @param string|null $chapter
* @param array $variables
*/
public function __construct(
string $name,
?string $template = null,
?string $code = null,
?string $chapter = null,
?array $variables = []
) {
$this->name = $name;
$this->template = $template;
$this->code = $code;
$this->chapter = $chapter;
$this->variables = $variables;
}
@@ -69,9 +69,9 @@ class Page
public static function create(
string $name,
?string $template = null,
?string $code = null,
?string $chapter = null,
?array $variables = []
): Page {
return new static($name, $template, $code, $variables);
return new static($name, $template, $chapter, $variables);
}
}