add StartInitializeRouter event

This commit is contained in:
Evan Prodromou 2009-10-28 16:07:57 -04:00
parent 2df1189465
commit 10df75f9a0
2 changed files with 466 additions and 461 deletions

View File

@ -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

View File

@ -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;
}