Source for file else.php
Documentation is available at else.php
* Generic else block, it supports all builtin optional-display blocks which are if/for/foreach/loop/with
* If any of those block contains an else statement, the content between {else} and {/block} (you do not
* need to close the else block) will be shown if the block's condition has no been met
* $array is not empty so we display it's values : {$val}
* if this shows, it means that $array is empty or doesn't exist.
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the use of this software.
* This file is released under the LGPL
* "GNU Lesser General Public License"
* More information can be found here:
* {@link http://www.gnu.org/copyleft/lesser.html}
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
public static $types =
array
'if' =>
true, 'elseif' =>
true, 'for' =>
true,
'foreach' =>
true, 'loop' =>
true, 'with' =>
true
public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
$block =
& $compiler->getCurrentBlock();
while (!isset
(self::$types[$block['type']])) {
$out .=
$compiler->removeTopBlock();
$block =
& $compiler->getCurrentBlock();
$out .=
$block['params']['postOutput'];
$block['params']['postOutput'] =
'';
$currentBlock =
& $compiler->getCurrentBlock();
public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content)
if (isset
($params['postOutput'])) {
return $content .
$params['postOutput'];
Documentation generated on Sun, 03 Aug 2008 15:12:31 +0200 by phpDocumentor 1.4.0