* Template.php:
(BSTemplate::evaluate)
- Change: BSTemplate is completely redone
- New: Implement Iterator in BSDBResult
- New: In the BSTemplate::$preParseHook method, the second parameter will be the BSTemplate object itself
+- New: Add BSTemplate::$globalVars to be substituted into every template
*/
public $vars = array();
+ /**
+ * Global variables
+ * @var array
+ */
+ public static $globalVars = array();
+
/**
* The file name of the template
* @var string
public function evaluate()
{
extract($this->vars);
+ extract(self::$globalVars);
ob_start();
$this->template = str_replace(array('$this->', 'self::'), 'null', $this->template); // don't want internal access coming from a template