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}
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
$block =
& $compiler->getCurrentBlock();
while ($block['type'] !==
'if' &&
$block['type'] !==
'foreach' &&
$block['type'] !==
'for' &&
$block['type'] !==
'with' &&
$block['type'] !==
'loop') {
$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 Sat, 28 Jun 2008 01:38:20 +0200 by phpDocumentor 1.4.0