From 26b77483ee7545c0e4f8eeb205a5743bf3589adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 12 Jul 2014 16:39:31 +0200 Subject: remove PicoFarad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ll implement it an other day. --- inc/3rdparty/PicoFarad/Template.php | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 inc/3rdparty/PicoFarad/Template.php (limited to 'inc/3rdparty/PicoFarad/Template.php') diff --git a/inc/3rdparty/PicoFarad/Template.php b/inc/3rdparty/PicoFarad/Template.php deleted file mode 100644 index c32be309..00000000 --- a/inc/3rdparty/PicoFarad/Template.php +++ /dev/null @@ -1,36 +0,0 @@ - 'value']); -function load() -{ - if (func_num_args() < 1 || func_num_args() > 2) { - die('Invalid template arguments'); - } - - if (! file_exists(PATH.func_get_arg(0).'.php')) { - die('Unable to load the template: "'.func_get_arg(0).'"'); - } - - if (func_num_args() === 2) { - - if (! is_array(func_get_arg(1))) { - die('Template variables must be an array'); - } - - extract(func_get_arg(1)); - } - - ob_start(); - include PATH.func_get_arg(0).'.php'; - return ob_get_clean(); -} - - -function layout($template_name, array $template_args = array(), $layout_name = 'layout') -{ - return load($layout_name, $template_args + array('content_for_layout' => load($template_name, $template_args))); -} -- cgit v1.2.3