Commit 2e126167 by darh

fixes #31

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