[ROUTES] Allow accept-header specification during router creation
Router: - Fix calls to connect, most of them were misusing the function's params URLMapper: - Minor fixes - Documentation - Add support for accept-header specification Plugins/*: - Fix calls to connect
This commit is contained in:
committed by
Diogo Cordeiro
parent
2032c7c1f7
commit
5c0a3102ff
@@ -39,16 +39,16 @@ class WebFingerPlugin extends Plugin
|
||||
|
||||
public function onRouterInitialized(URLMapper $m)
|
||||
{
|
||||
$m->connect('.well-known/host-meta', array('action' => 'hostmeta'));
|
||||
$m->connect('.well-known/host-meta', ['action' => 'hostmeta']);
|
||||
$m->connect('.well-known/host-meta.:format',
|
||||
array('action' => 'hostmeta',
|
||||
'format' => '(xml|json)'));
|
||||
['action' => 'hostmeta'],
|
||||
['format' => '(xml|json)']);
|
||||
// the resource GET parameter can be anywhere, so don't mention it here
|
||||
$m->connect('.well-known/webfinger', array('action' => 'webfinger'));
|
||||
$m->connect('.well-known/webfinger', ['action' => 'webfinger']);
|
||||
$m->connect('.well-known/webfinger.:format',
|
||||
array('action' => 'webfinger',
|
||||
'format' => '(xml|json)'));
|
||||
$m->connect('main/ownerxrd', array('action' => 'ownerxrd'));
|
||||
['action' => 'webfinger'],
|
||||
['format' => '(xml|json)']);
|
||||
$m->connect('main/ownerxrd', ['action' => 'ownerxrd']);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user