[limb-svn] r7002 - 3.x/trunk/limb/web_app/src

svn at limb-project.com svn at limb-project.com
Mon May 12 09:16:37 MSD 2008


Author: pachanga
Date: 2008-05-12 09:16:37 +0400 (Mon, 12 May 2008)
New Revision: 7002
URL: http://fisheye.limb-project.com/changelog/limb/?cs=7002

Modified:
   3.x/trunk/limb/web_app/src/lmbWebApplication.class.php
Log:
-- adding request dispatcher setter

Modified: 3.x/trunk/limb/web_app/src/lmbWebApplication.class.php
===================================================================
--- 3.x/trunk/limb/web_app/src/lmbWebApplication.class.php	2008-05-11 21:03:15 UTC (rev 7001)
+++ 3.x/trunk/limb/web_app/src/lmbWebApplication.class.php	2008-05-12 05:16:37 UTC (rev 7002)
@@ -22,12 +22,25 @@
   protected $pre_dispatch_filters = array();
   protected $pre_action_filters = array();
   protected $pre_view_filters = array();
+  protected $request_dispatcher = null;
 
   function setDefaultControllerName($name)
   {
     $this->default_controller_name = $name;
   }
 
+  function setRequestDispatcher($disp)
+  {
+    $this->request_dispatcher = $disp;
+  }
+
+  protected function  _getRequestDispatcher()
+  {
+    if(!is_object($this->request_dispatcher))
+      return new lmbHandle('limb/web_app/src/request/lmbRoutesRequestDispatcher');
+    return $this->request_dispatcher;
+  }
+
   function addPreDispatchFilter($filter)
   {
     $this->pre_dispatch_filters[] = $filter;
@@ -57,7 +70,7 @@
     $this->_addFilters($this->pre_dispatch_filters);
 
     $this->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbRequestDispatchingFilter',
-                                        array(new lmbHandle('limb/web_app/src/request/lmbRoutesRequestDispatcher'), 
+                                        array($this->_getRequestDispatcher(), 
                                               $this->default_controller_name)));
     $this->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbResponseTransactionFilter'));
 



More information about the limb-svn mailing list