Commit bd9d98a2 by Seldaek

merging changes from 1.1

git-svn-id: svn://dwoo.org/dwoo/trunk@279 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent b2dab7b9
[2009--] 1.1.0
[2009--] 1.1.1
+ Added Dwoo::setTemplate() for testing purposes mostly
[2009-07-18] 1.1.0
! BC Break: Dwoo::initGlobals() is only called once during the Dwoo object
construction. If you had overriden it and need to update global data
before each template is executed you should instead override
......
......@@ -332,7 +332,7 @@ class Dwoo
} else {
throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s data argument must be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array', E_USER_NOTICE);
}
$this->globals['template'] = $_tpl->getName();
$this->initRuntimeVars($_tpl);
......@@ -433,7 +433,7 @@ class Dwoo
/**
* re-initializes the runtime variables before each template run
*
*
* override this method to inject data in the globals array if needed, this
* method is called before each template execution
*
......@@ -742,6 +742,16 @@ class Dwoo
}
/**
* sets the current template being rendered
*
* @param Dwoo_ITemplate $tpl template object
*/
public function setTemplate(Dwoo_ITemplate $tpl)
{
$this->template = $tpl;
}
/**
* sets the default compiler factory function for the given resource name
*
* a compiler factory must return a Dwoo_ICompiler object pre-configured to fit your needs
......@@ -1503,10 +1513,10 @@ class Dwoo
{
return $this->scope;
}
/**
* Redirects all calls to unexisting to plugin proxy.
*
*
* @param string Method name
* @param array List of arguments
* @return mixed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment