[limb-svn] r6906 - 3.x/trunk/limb/view/src/toolkit
svn at limb-project.com
svn at limb-project.com
Wed Apr 9 23:43:49 MSD 2008
Author: pachanga
Date: 2008-04-09 23:43:48 +0400 (Wed, 09 Apr 2008)
New Revision: 6906
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6906
Modified:
3.x/trunk/limb/view/src/toolkit/lmbViewTools.class.php
Log:
-- LIMB_SUPPORTED_VIEW_TYPES constant added, it can be used to setup which view types should be used
Modified: 3.x/trunk/limb/view/src/toolkit/lmbViewTools.class.php
===================================================================
--- 3.x/trunk/limb/view/src/toolkit/lmbViewTools.class.php 2008-04-09 19:27:47 UTC (rev 6905)
+++ 3.x/trunk/limb/view/src/toolkit/lmbViewTools.class.php 2008-04-09 19:43:48 UTC (rev 6906)
@@ -12,6 +12,7 @@
@define('LIMB_WACT_TAGS_INCLUDE_PATH', 'src/wact;limb/*/src/wact;limb/wact/src/tags;src/template/tags;limb/*/src/template/tags;limb/wact/src/tags');
@define('LIMB_MACRO_TAGS_INCLUDE_PATH', 'src/macro;limb/*/src/macro;limb/macro/src/tags');
@define('LIMB_MACRO_FILTERS_INCLUDE_PATH', 'src/macro;limb/*/src/macro;limb/macro/src/filters');
+ at define('LIMB_SUPPORTED_VIEW_TYPES', '.html=lmbWactView;.phtml=lmbMacroView');
/**
* class lmbViewTools.
@@ -21,12 +22,23 @@
*/
class lmbViewTools extends lmbAbstractTools
{
- protected $view_types = array('.html' => 'lmbWactView',
- '.phtml' => 'lmbMacroView');
+ protected $view_types = array();
protected $wact_locator;
protected $macro_config;
protected $macro_locator;
+ function __construct()
+ {
+ parent :: __construct();
+
+ $items = explode(';', LIMB_SUPPORTED_VIEW_TYPES);
+ foreach($items as $item)
+ {
+ list($ext, $class) = explode('=', $item);
+ $this->view_types[$ext] = $class;
+ }
+ }
+
function setSupportedViewTypes($types)
{
$this->view_types = $types;
More information about the limb-svn
mailing list