Elgg
Version 2.3
|
Public Member Functions | |
__construct (PluginHooksService $hooks) | |
Constructor. More... | |
route (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... | |
allowRewrite (Request $request) | |
Filter a request through the route:rewrite hook. More... | |
Definition at line 21 of file Router.php.
Elgg\Router::__construct | ( | PluginHooksService | $hooks | ) |
Constructor.
PluginHooksService | $hooks | For customized routing. |
Definition at line 33 of file Router.php.
Elgg\Router::allowRewrite | ( | Request | $request | ) |
Filter a request through the route:rewrite hook.
Request | $request | Elgg request |
Definition at line 168 of file Router.php.
Elgg\Router::getPageHandlers | ( | ) |
Get page handlers as array of identifier => callback.
Definition at line 156 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 131 of file Router.php.
Elgg\Router::route | ( | 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.
Request | $request | The request to handle. |
Definition at line 47 of file Router.php.
Elgg\Router::unregisterPageHandler | ( | $identifier | ) |
Unregister a page handler for an identifier.
string | $identifier | The page type identifier |
Definition at line 147 of file Router.php.