expanded menu chapter and refactored old chapters

This commit is contained in:
Patrick 2015-02-08 20:16:44 +01:00 committed by lubiana
parent 5970047cba
commit 4e0743f975
3 changed files with 69 additions and 13 deletions

View file

@ -86,7 +86,7 @@ You could also put the page related things into it's own package and reuse it in
Because PHP does not have the ability to type hint for scalar values (things like strings and integers), we have to manually check that `$pageFolder` is a string. If we don't do that, there might be a bug in the future that is hard to find if a wrong type is injected. By throwing an exception, this can be caught and debugged immediately.
This will do for now. Let's create a template file for our pages with the name `Page.mustache` in the `templates` folder. For now just add `{{ content }}` in there.
This will do for now. Let's create a template file for our pages with the name `Page.html` in the `templates` folder. For now just add `{{ content }}` in there.
Add the following to your `Dependencies.php` file so that the application know which implementation to inject for our new interface. We also define the the `pageFolder` there.