Commit e55d5ef4 by seldaek

git-svn-id: svn://dwoo.org/dwoo/trunk@235 0598d79b-80c4-4d41-97ba-ac86fbbd088b

parent 2c0b300f
......@@ -102,6 +102,22 @@ class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
}
/**
* provides a custom compiler to the dwoo renderer with optional settings
* you can set in the agavi output_types.xml config file
*
* @return Dwoo_Compiler
*/
public function compilerFactory()
{
if (class_exists('Dwoo_Compiler', false) === false) {
include DWOO_DIRECTORY . 'Dwoo/Compiler.php';
}
$compiler = Dwoo_Compiler::compilerFactory();
$compiler->setAutoEscape((bool) $this->getParameter('auto_escape', false));
return $compiler;
}
/**
* Grab a cleaned up dwoo instance.
*
* @return Dwoo A Dwoo instance.
......@@ -136,6 +152,8 @@ class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer
$this->dwoo->getLoader()->addDirectory($this->plugin_dir);
}
$this->dwoo->setDefaultCompilerFactory('file', array($this, 'compilerFactory'));
return $this->dwoo;
}
......
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