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.
* @author Jordi Boggiano <j.boggiano@seld.be>
* @copyright Copyright (c) 2008, Jordi Boggiano
* @license http://dwoo.org/LICENSE Modified BSD License
public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
$preContent .=
$compiler->removeTopBlock();
$block =
& $compiler->getCurrentBlock();
if (in_array('Dwoo_IElseable', $interfaces) !==
false) {
$params['initialized'] =
true;
$compiler->injectBlock($type, $params);
public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content)
if (!isset
($params['initialized'])) {
$block =
& $compiler->getCurrentBlock();
Documentation generated on Sun, 07 Feb 2010 17:53:41 +0000 by phpDocumentor 1.4.0