Source for file elseif.php
Documentation is available at elseif.php
* Acts as a php elseif block, allowing you to add one more condition
* if the previous one(s) didn't match. See the {if} plugin for syntax details
* 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 function init(array $rest)
public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
$if =
& $compiler->findBlock('if', true);
$out =
$if['params']['postOutput'];
$if['params']['postOutput'] =
'';
$compiler->injectBlock($type, $params, 1);
$currentBlock =
& $compiler->getCurrentBlock();
$params =
$compiler->getCompiledParams($params);
return $out .
" elseif (".
implode(' ', self::replaceKeywords($params['*'], $compiler)).
") {\n" .
Dwoo_Compiler::PHP_CLOSE;
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:21 +0200 by phpDocumentor 1.4.0