svn: /pear2/Templates_Savant/trunk/src/Templates/Savant/ Main.php

From: Date: Mon, 26 Apr 2010 21:19:41 +0000
Subject: svn: /pear2/Templates_Savant/trunk/src/Templates/Savant/ Main.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9379@lists.php.net to get a copy of this message
saltybeagle Mon, 26 Apr 2010 21:19:41 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=298619 Log: Add renderNull for simply rendering a template with no context. Changed paths: U pear2/Templates_Savant/trunk/src/Templates/Savant/Main.php Modified: pear2/Templates_Savant/trunk/src/Templates/Savant/Main.php =================================================================== --- pear2/Templates_Savant/trunk/src/Templates/Savant/Main.php 2010-04-26 20:56:11 UTC (rev 298618) +++ pear2/Templates_Savant/trunk/src/Templates/Savant/Main.php 2010-04-26 21:19:41 UTC (rev 298619) @@ -670,6 +670,21 @@ return $this->fetch($object, $template); } + /** + * Used to render null through an optional template + * + * @param null $null The null var + * @param string $template Template to render null through + * + * @return string Rendered output + */ + protected function renderNULL($null, $template = null) + { + if ($template) { + return $this->fetch(null, $template); + } + } + protected function fetch($mixed, $template = null) { if ($template) {

« previous php.pear.core (#9379) next »