Permalink
Browse files

Add renderNull for simply rendering a template with no context.

  • Loading branch information...
1 parent 93eac72 commit b6e65dbff5793774db7cad97255f392be60b6262 @saltybeagle saltybeagle committed Apr 26, 2010
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/Templates/Savant/Main.php
@@ -670,6 +670,21 @@ protected function renderObject($object, $template = null)
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) {

0 comments on commit b6e65db

Please sign in to comment.