Elgg
Version 1.9
|
Public Member Functions | |
__construct (Elgg_PluginHooksService $hooks) | |
Constructor. More... | |
route (Elgg_Http_Request $request) | |
Routes the request to a registered page handler. More... | |
registerPageHandler ($identifier, $function) | |
Register a function that gets called when the first part of a URL is equal to the identifier. More... | |
unregisterPageHandler ($identifier) | |
Unregister a page handler for an identifier. More... | |
getPageHandlers () | |
Get page handlers as array of identifier => callback. More... | |
Definition at line 15 of file Router.php.
Elgg_Router::__construct | ( | Elgg_PluginHooksService | $hooks | ) |
Constructor.
Elgg_PluginHooksService | $hooks | For customized routing. |
Definition at line 24 of file Router.php.
Elgg_Router::getPageHandlers | ( | ) |
Get page handlers as array of identifier => callback.
Definition at line 119 of file Router.php.
Elgg_Router::registerPageHandler | ( | $identifier, | |
$function | |||
) |
Register a function that gets called when the first part of a URL is equal to the identifier.
string | $identifier | The page type to handle |
string | $function | Your function name |
Definition at line 94 of file Router.php.
Elgg_Router::route | ( | Elgg_Http_Request | $request | ) |
Routes the request to a registered page handler.
This function triggers a plugin hook `'route', $identifier` so that plugins can modify the routing or handle a request.
Elgg_Http_Request | $request | The request to handle. |
Definition at line 38 of file Router.php.
Elgg_Router::unregisterPageHandler | ( | $identifier | ) |
Unregister a page handler for an identifier.
string | $identifier | The page type identifier |
Definition at line 110 of file Router.php.