Inheritance diagram for Dispatcher:

Public Member Functions | |
| __construct ($url=null, $base=false) | |
| __extractParams ($url, $additionalParams=array()) | |
| & | __getController ($params=null) |
| __loadController ($params) | |
| _invoke (&$controller, $params) | |
| _restructureParams ($params, $reverse=false) | |
| baseUrl () | |
| cached ($url) | |
| dispatch ($url=null, $additionalParams=array()) | |
| getUrl ($uri=null, $base=null) | |
| parseParams ($fromUrl) | |
| uri () | |
Public Attributes | |
| $admin = false | |
| $base = false | |
| $here = false | |
| $params = null | |
| $plugin = null | |
| $webroot = '/' | |
Definition at line 40 of file dispatcher.php.
| Dispatcher::__construct | ( | $ | url = null, |
|
| $ | base = false | |||
| ) |
Constructor.
Definition at line 86 of file dispatcher.php.
References $base, $url, dispatch(), and Configure::write().
| Dispatcher::__extractParams | ( | $ | url, | |
| $ | additionalParams = array() | |||
| ) |
Sets the params when $url is passed as an array to Object::requestAction();
| array | $url | |
| array | $additionalParams |
Definition at line 250 of file dispatcher.php.
References $url, params(), and Router::url().
Referenced by dispatch().
| & Dispatcher::__getController | ( | $ | params = null |
) |
Get controller to use, either plugin controller or application controller
| array | $params Array of parameters |
Definition at line 422 of file dispatcher.php.
References $params, __loadController(), _restructureParams(), and params().
Referenced by dispatch().
| Dispatcher::__loadController | ( | $ | params | ) |
Load controller and return controller class
| array | $params Array of parameters |
Definition at line 464 of file dispatcher.php.
References $params, camelize(), App::import(), and params().
Referenced by __getController().
| Dispatcher::_invoke | ( | &$ | controller, | |
| $ | params | |||
| ) |
Invokes given controller's render action if autoRender option is set. Otherwise the contents of the operation are returned as a string.
| object | $controller Controller to invoke | |
| array | $params Parameters with at least the 'action' to invoke | |
| boolean | $missingAction Set to true if missing action should be rendered, false otherwise |
Definition at line 206 of file dispatcher.php.
References $output, $params, Object::cakeError(), camelize(), and App::import().
Referenced by dispatch().
| Dispatcher::_restructureParams | ( | $ | params, | |
| $ | reverse = false | |||
| ) |
Restructure params in case we're serving a plugin.
| array | $params Array on where to re-set 'controller', 'action', and 'pass' indexes | |
| boolean | $reverse |
Definition at line 393 of file dispatcher.php.
References $params, and Router::getArgs().
Referenced by __getController().
| Dispatcher::baseUrl | ( | ) |
Returns a base URL and sets the proper webroot
Definition at line 334 of file dispatcher.php.
References $base, $config, $webroot, env(), and Configure::read().
Referenced by dispatch().
| Dispatcher::cached | ( | $ | url | ) |
Outputs cached dispatch for js, css, img, view cache
| string | $url Requested URL public |
Definition at line 585 of file dispatcher.php.
References $filename, $path, $plugin, $url, Object::_stop(), env(), App::import(), Configure::read(), and slug().
Referenced by dispatch().
| Dispatcher::dispatch | ( | $ | url = null, |
|
| $ | additionalParams = array() | |||
| ) |
Dispatches and invokes given URL, handing over control to the involved controllers, and then renders the results (if autoRender is set).
If no controller of given name can be found, invoke() shows error messages in the form of Missing Controllers information. It does the same with Actions (methods of Controllers are called Actions).
| string | $url URL information to work on | |
| array | $additionalParams Settings array ("bare", "return") which is melded with the GET and POST params |
Definition at line 106 of file dispatcher.php.
References $url, __extractParams(), __getController(), _invoke(), Object::_stop(), baseUrl(), cached(), Object::cakeError(), camelize(), getUrl(), params(), parseParams(), Router::prefixes(), and Router::setRequestInfo().
Referenced by __construct().
| Dispatcher::getUrl | ( | $ | uri = null, |
|
| $ | base = null | |||
| ) |
Returns and sets the $_GET[url] derived from the REQUEST_URI
| string | $uri Request URI | |
| string | $base Base path |
Definition at line 537 of file dispatcher.php.
References $base, $url, and uri().
Referenced by dispatch().
| Dispatcher::parseParams | ( | $ | fromUrl | ) |
Returns array of GET and POST parameters. GET parameters are taken from given URL.
| string | $fromUrl URL to mine for parameter information. |
Definition at line 262 of file dispatcher.php.
References $params, $url, env(), Router::getNamedExpressions(), Router::parse(), Router::stripEscape(), and stripslashes_deep().
Referenced by dispatch().
| Dispatcher::uri | ( | ) |
Returns the REQUEST_URI from the server environment, or, failing that, constructs a new one, using the PHP_SELF constant and other variables.
Definition at line 491 of file dispatcher.php.
Referenced by getUrl().
| Dispatcher::$admin = false |
Definition at line 68 of file dispatcher.php.
| Dispatcher::$base = false |
Definition at line 47 of file dispatcher.php.
Referenced by __construct(), baseUrl(), getUrl(), and uri().
| Dispatcher::$here = false |
Definition at line 61 of file dispatcher.php.
| Dispatcher::$params = null |
Definition at line 82 of file dispatcher.php.
Referenced by __getController(), __loadController(), _invoke(), _restructureParams(), and parseParams().
| Dispatcher::$plugin = null |
| Dispatcher::$webroot = '/' |
1.4.7