Add template engine This patch adds an initial simplistic template engine to separate logic from the presentation. Basic initial features: - escaping via Context::noHtml() a
Add template engine This patch adds an initial simplistic template engine to separate logic from the presentation. Basic initial features: - escaping via Context::noHtml() and Context::e() methods - blocks - nesting options using includes and extending layouts - PHP syntax - variable scopes dedicated to template scope only - Appending blocks (when JS files are in need to be appended) - initial unit and functional tests - Main index page refactored as an example of usage - Very short intro docs how to use the template layer - Thanks to @nhlm for the code review and numerous suggestions to improve the usability and code stability, - Thanks to @KalleZ and for the code review and numerous common sense suggestions about templates themselves. - Thanks to @Maikuolan for the code review and numerous suggestions about the usability. - Moved hash ids redirection to aseparate JavaScript file - Use location instead of window.location in the JavaScript redirection Discussions: - http://news.php.net/php.webmaster/27603 - https://github.com/php/web-bugs/pull/66
show more ...
|