add StartInitializeRouter event
This commit is contained in:
parent
2df1189465
commit
10df75f9a0
@ -129,6 +129,9 @@ StartSubGroupNav: Showing the subscriptions group nav menu
|
||||
EndSubGroupNav: At the end of the subscriptions group nav menu
|
||||
- $action: the current action
|
||||
|
||||
StartInitializeRouter: Before the router instance has been initialized; good place to add routes
|
||||
- $m: the Net_URL_Mapper that has just been set up
|
||||
|
||||
RouterInitialized: After the router instance has been initialized
|
||||
- $m: the Net_URL_Mapper that has just been set up
|
||||
|
||||
|
@ -71,6 +71,8 @@ class Router
|
||||
{
|
||||
$m = Net_URL_Mapper::getInstance();
|
||||
|
||||
if (Event::handle('StartInitializeRouter', array(&$m))) {
|
||||
|
||||
// In the "root"
|
||||
|
||||
$m->connect('', array('action' => 'public'));
|
||||
@ -360,7 +362,6 @@ class Router
|
||||
|
||||
// direct messages
|
||||
|
||||
|
||||
$m->connect('api/direct_messages.:format',
|
||||
array('action' => 'ApiDirectMessage',
|
||||
'format' => '(xml|json|rss|atom)'));
|
||||
@ -627,6 +628,7 @@ class Router
|
||||
array('nickname' => '[a-zA-Z0-9]{1,64}'));
|
||||
|
||||
Event::handle('RouterInitialized', array($m));
|
||||
}
|
||||
|
||||
return $m;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user