Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
ISSO - Commitdiff - ViewGit - Blue Static

Create a toString method for BSTemplate that will evaluate it

Robert Sesek [2009-01-15 16:08]
Create a toString method for BSTemplate that will evaluate it

* Template.php:
(BSTemplate::__toString): Implemented to call evaluate()->getTemplate()
* version.php: Bumping the version number
diff --git a/CHANGES b/CHANGES
index cc55eb4..b413b8d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3.2.2
+===================
+- New: Added BSTemplate::__toString() to evaluate the template
+
 3.2.1
 ===================
 - New: BSFunctions::bool_to_string() to convert a boolean value into human-readable Yes/No
diff --git a/Template.php b/Template.php
index aeb8a72..dfe30c1 100644
--- a/Template.php
+++ b/Template.php
@@ -179,6 +179,17 @@ class BSTemplate
 	}

 	/**
+	 * Evaluates and returns the template. This is equivalent to calling:
+	 * $tpl->evaluate()->getTemplate()
+	 *
+	 * @return	string
+	 */
+	public function __toString()
+	{
+		return $this->evaluate()->getTemplate();
+	}
+
+	/**
 	 * Returns the template data
 	 *
 	 * @return	string	Final template data
diff --git a/version.php b/version.php
index e43dfb4..83043fe 100644
--- a/version.php
+++ b/version.php
@@ -22,6 +22,6 @@
 /**
  * ISSO version
  */
-define('ISSO_VERSION', '3.2.1');
+define('ISSO_VERSION', '3.2.2');

 ?>
\ No newline at end of file