Fixing file upload params ($_FILES) normalization. Closes #75
[akelos.git] / lib / AkDispatcher.php
blob3e5abee3cf0a4489b3f8b8b44f0cb741edc71112
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4 // +----------------------------------------------------------------------+
5 // | Akelos Framework - http://www.akelos.org |
6 // +----------------------------------------------------------------------+
7 // | Copyright (c) 2002-2006, Akelos Media, S.L. & Bermi Ferrer Martinez |
8 // | Released under the GNU Lesser General Public License, see LICENSE.txt|
9 // +----------------------------------------------------------------------+
11 /**
12 * @package ActionController
13 * @subpackage Dispatcher
14 * @author Bermi Ferrer <bermi a.t akelos c.om>
15 * @copyright Copyright (c) 2002-2007, Akelos Media, S.L. http://www.akelos.org
16 * @license GNU Lesser General Public License <http://www.gnu.org/copyleft/lesser.html>
17 * @deprecated Please use AkDispatcher on your public/index.php instead
21 require_once(AK_LIB_DIR.DS.'Ak.php');
22 require_once(AK_LIB_DIR.DS.'AkObject.php');
23 require_once(AK_LIB_DIR.DS.'AkActionController.php');
24 require_once(AK_LIB_DIR.DS.'AkInflector.php');
25 require_once(AK_LIB_DIR.DS.'AkRequest.php');
26 require_once(AK_LIB_DIR.DS.'AkResponse.php');
27 require_once(AK_LIB_DIR.DS.'AkRouter.php');
30 /**
31 * This class provides an interface for dispatching a request
32 * to the appropriate controller and action.
34 class AkDispatcher
36 var $Request;
37 var $Response;
38 var $Controller;
40 function dispatch()
42 $this->Request =& AkRequest();
43 $this->Response =& AkResponse();
44 $this->Controller =& $this->Request->recognize();
45 $this->Controller->process($this->Request, $this->Response);
49 /**
50 * @todo Implement a mechanism for enabling multiple requests on the same dispatcher
51 * this will allow using Akelos as an Application Server using the
52 * approach described at http://blog.milkfarmsoft.com/?p=51
55 function restoreRequest()