Commit cb3c2b55 by seldaek

Allow custom plugins to be called from within sub-templates, fixes #51

git-svn-id: http://svn.dwoo.org/trunk@323 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent c417fe27
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* Fixed a couple bugs in the {dynamic} plugin with regard to using plugins * Fixed a couple bugs in the {dynamic} plugin with regard to using plugins
within a dynamic block within a dynamic block
* Fixed a {load_templates} bug, plugins used in external templates were not * Fixed a {load_templates} bug, plugins used in external templates were not
loaded correctly loaded correctly, same for custom user plugins
* Cached templates now check the source template for modification before * Cached templates now check the source template for modification before
outputting the cached version outputting the cached version
* Removed a couple of @-operator calls to file_get_contents * Removed a couple of @-operator calls to file_get_contents
......
...@@ -1093,10 +1093,11 @@ class Dwoo ...@@ -1093,10 +1093,11 @@ class Dwoo
* this is so a single instance of every class plugin is created at each template run, * this is so a single instance of every class plugin is created at each template run,
* allowing class plugins to have "per-template-run" static variables * allowing class plugins to have "per-template-run" static variables
* *
* @private
* @param string $class the class name * @param string $class the class name
* @return mixed an object of the given class * @return mixed an object of the given class
*/ */
protected function getObjectPlugin($class) public function getObjectPlugin($class)
{ {
if (isset($this->runtimePlugins[$class])) { if (isset($this->runtimePlugins[$class])) {
return $this->runtimePlugins[$class]; return $this->runtimePlugins[$class];
......
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