Development

/branches/1.0/lib/controller/sfConsoleController.class.php

You must first sign up to be able to contribute.

root/branches/1.0/lib/controller/sfConsoleController.class.php

Revision 3204, 1.1 kB (checked in by fabien, 7 years ago)

updated phpdoc for the controller/ directory

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Rev Date
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * @package    symfony
13  * @subpackage controller
14  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
15  * @version    SVN: $Id$
16  */
17 class sfConsoleController extends sfController
18 {
19   /**
20    * Dispatches a request.
21    *
22    * @param string A module name
23    * @param string An action name
24    * @param array  An associative array of parameters to be set
25    */
26   public function dispatch($moduleName, $actionName, $parameters = array())
27   {
28     try
29     {
30       // set parameters
31       $this->getContext()->getRequest()->getParameterHolder()->add($parameters);
32
33       // make the first request
34       $this->forward($moduleName, $actionName);
35     }
36     catch (sfException $e)
37     {
38       $e->printStackTrace();
39     }
40     catch (Exception $e)
41     {
42       // wrap non symfony exceptions
43       $sfException = new sfException();
44       $sfException->printStackTrace($e);
45     }
46   }
47 }
48
Note: See TracBrowser for help on using the browser.