[ Index ]

PHP Cross Reference of Akelos Framework

title

Body

[close]

/ -> AkDispatcher.php (source)

   1  <?php
   2  /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
   3  
   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  // +----------------------------------------------------------------------+
  10  
  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
  18   */
  19  
  20  
  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');
  28  
  29  
  30  /**
  31   * This class provides an interface for dispatching a request
  32   * to the appropriate controller and action.
  33   */
  34  class AkDispatcher
  35  {
  36      var $Request;
  37      var $Response;
  38      var $Controller;
  39      
  40      function dispatch()
  41      {
  42          $this->Request =& AkRequest();
  43          $this->Response =& AkResponse();
  44          $this->Controller =& $this->Request->recognize();
  45          $this->Controller->process($this->Request, $this->Response);
  46      }
  47      
  48      
  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
  53       *
  54       */
  55      function restoreRequest()
  56      {
  57      }
  58  }
  59  
  60  ?>


Generated: Mon Oct 27 12:43:49 2008 Cross-referenced by PHPXref 0.6