[ActivityStreamsTwo] Introduce a structure for data representation in ActivityStreams 2.0
Type factory borrowed from landrok/activitypub
This commit is contained in:
parent
043c5da58b
commit
4b1780a2ee
@ -24,7 +24,7 @@ class ActivityStreamsTwo extends Plugin
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $route
|
* @param string $route
|
||||||
* @param array $accept_header
|
* @param array $accept
|
||||||
* @param array $vars
|
* @param array $vars
|
||||||
* @param null|TypeResponse $response
|
* @param null|TypeResponse $response
|
||||||
*
|
*
|
||||||
@ -32,9 +32,9 @@ class ActivityStreamsTwo extends Plugin
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function onControllerResponseInFormat(string $route, array $accept_header, array $vars, ?TypeResponse &$response = null): bool
|
public function onRouteInFormat(string $route, array $accept, array $vars, ?TypeResponse &$response = null): bool
|
||||||
{
|
{
|
||||||
if (empty(array_intersect($this->accept, $accept_header))) {
|
if (empty(array_intersect($this->accept, $accept))) {
|
||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
switch ($route) {
|
switch ($route) {
|
||||||
|
Loading…
Reference in New Issue
Block a user