Commit 6a2aa583 by Seldaek

* Fixed $dwoo->addResource() breaking if the resource class was not loaded yet,…

* Fixed $dwoo->addResource() breaking if the resource class was not loaded yet, autoload should now be called (thanks mike) git-svn-id: svn://dwoo.org/dwoo/trunk@67 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent 157ad4e0
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
work work
* {literal} and {strip} now follow the LooseOpeningsHandling setting * {literal} and {strip} now follow the LooseOpeningsHandling setting
* Fixed complex variables (i.e. {$_root[$c[$x.0]].0}) parsing bugs * Fixed complex variables (i.e. {$_root[$c[$x.0]].0}) parsing bugs
* Fixed $dwoo->addResource() breaking if the resource class was not loaded yet,
autoload should now be called (thanks mike)
[2008-05-10] 0.9.0 [2008-05-10] 0.9.0
! BC Break: changed all class names to be PEAR compliant (aka use underscores ! BC Break: changed all class names to be PEAR compliant (aka use underscores
......
...@@ -547,7 +547,10 @@ class Dwoo ...@@ -547,7 +547,10 @@ class Dwoo
if(strlen($name) < 2) if(strlen($name) < 2)
throw new Dwoo_Exception('Resource names must be at least two-character long to avoid conflicts with Windows paths'); throw new Dwoo_Exception('Resource names must be at least two-character long to avoid conflicts with Windows paths');
$interfaces = class_implements($class, false); if(!class_exists($class))
throw new Dwoo_Exception('Resource class does not exist');
$interfaces = class_implements($class);
if(in_array('Dwoo_ITemplate', $interfaces) === false) if(in_array('Dwoo_ITemplate', $interfaces) === false)
throw new Dwoo_Exception('Resource class must implement Dwoo_ITemplate'); throw new Dwoo_Exception('Resource class must implement Dwoo_ITemplate');
......
...@@ -39,6 +39,11 @@ class Dwoo_Smarty__Adapter extends Dwoo ...@@ -39,6 +39,11 @@ class Dwoo_Smarty__Adapter extends Dwoo
// magic get/set/call functions that handle unsupported features // magic get/set/call functions that handle unsupported features
public function __set($p, $v) public function __set($p, $v)
{ {
if($p==='scope')
{
$this->scope = $v;
return;
}
if(array_key_exists($p, $this->compat['properties']) !== false) if(array_key_exists($p, $this->compat['properties']) !== false)
{ {
if($this->show_compat_errors) if($this->show_compat_errors)
......
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