[ActivityStreamsTwo] Introduce a structure for data representation in ActivityStreams 2.0

Type factory borrowed from landrok/activitypub
This commit is contained in:
Diogo Peralta Cordeiro 2021-08-24 20:29:26 +01:00 committed by Hugo Sales
parent 043c5da58b
commit 4b1780a2ee
No known key found for this signature in database
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -24,7 +24,7 @@ class ActivityStreamsTwo extends Plugin
/**
* @param string $route
* @param array $accept_header
* @param array $accept
* @param array $vars
* @param null|TypeResponse $response
*
@ -32,9 +32,9 @@ class ActivityStreamsTwo extends Plugin
*
* @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;
}
switch ($route) {