bored

A micro PHP framework
git clone git://git.bitsmanent.org/bored
Log | Files | Refs | README

commit e097d897793538c956965b5efe6708dfd94b195e
parent 850e8448412ae05434955685df858f57f5e710bf
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Wed,  2 Mar 2016 19:30:05 +0100

Rename viewl* functions to lview*.

This commit also limit view() with only two arguments, thus always forcing the
default layout.  Implications are about interface quality, using an lview*
function to interact with the layout end up in a clearer code and more easy to
debug.

Diffstat:
Mbored.php | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bored.php b/bored.php @@ -529,7 +529,7 @@ function viewinc($name, $data = []) { return $d; } -function viewlinc($name, $data = [], $layout = null, $layoutdata = []) { +function lviewinc($name, $data = [], $layout = null, $layoutdata = []) { if(!$layout) { if(!defined('DEFAULT_LAYOUT')) die('DEFAULT_LAYOUT not defined'); @@ -539,8 +539,8 @@ function viewlinc($name, $data = [], $layout = null, $layoutdata = []) { return viewinc($layout, $layoutdata); } -function view($name, $data = [], $layout = null, $layoutdata = []) { - return viewlinc($name, $data, $layout, $layoutdata); +function view($name, $data = []) { + return lviewinc($name, $data, null, []); } function bored_run() {