Commit 2e126167 by darh

fixes #31

git-svn-id: svn://dwoo.org/dwoo/trunk@259 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent f71d4289
...@@ -33,6 +33,14 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract ...@@ -33,6 +33,14 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract
* @var Dwoo_Compiler * @var Dwoo_Compiler
*/ */
protected $_compiler = null; protected $_compiler = null;
/**
* Changing Filter's scope to play nicely
*
* @var array
*/
protected $_filter = array();
/** /**
* @var string * @var string
...@@ -95,14 +103,8 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract ...@@ -95,14 +103,8 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract
} }
// end BC // end BC
// Making sure that everything is loaded. // Making sure that everything is loaded.
$defaults = array( $classes = array('engine', 'dataProvider', 'compiler');
'engine' => 'Dwoo',
'dataProvider' => 'Dwoo_Data',
'compiler' => 'Dwoo_Compiler',
);
$opt = array_merge($defaults, $opt);
// Setting options to Dwoo objects... // Setting options to Dwoo objects...
foreach ($opt as $type => $settings) { foreach ($opt as $type => $settings) {
...@@ -118,7 +120,7 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract ...@@ -118,7 +120,7 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract
call_user_func(array($this, 'set' . $type), $settings['type']); call_user_func(array($this, 'set' . $type), $settings['type']);
} }
if (array_key_exists($type, $defaults)) { if (in_array($type, $classes)) {
// Call get so that the class is initialized // Call get so that the class is initialized
$rel = call_user_func(array($this, 'get' . $type)); $rel = call_user_func(array($this, 'get' . $type));
...@@ -330,9 +332,9 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract ...@@ -330,9 +332,9 @@ class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract
* @return Dwoo_Data * @return Dwoo_Data
*/ */
public function getCompiler() public function getCompiler()
{ {
if (null === $this->_compiler) { if (null === $this->_compiler) {
$this->_compiler = new Dwoo_Compiler; $this->_compiler = Dwoo_Compiler::compilerFactory();
} }
return $this->_compiler; return $this->_compiler;
......
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