517ed953f2
Refactored AS2 inside AP; [ENTITY][Activity] went from core to AP Webfinger plugin will be part of FreeNetwork component
27 lines
575 B
PHP
27 lines
575 B
PHP
<?php
|
|
|
|
namespace Plugin\ActivityPub\Util\Response;
|
|
|
|
use Plugin\ActivityPub\Util\Model\EntityToType\EntityToType;
|
|
|
|
abstract class AbstractResponse
|
|
{
|
|
/**
|
|
* param Type $type // What is this `Type`
|
|
*
|
|
* @param int $status The response status code
|
|
* @param mixed $type
|
|
*
|
|
* @throws \Exception
|
|
*
|
|
* @return TypeResponse
|
|
*/
|
|
public static function handle($type, int $status = 200): TypeResponse
|
|
{
|
|
return new TypeResponse(
|
|
data: EntityToType::translate($type),
|
|
status: $status
|
|
);
|
|
}
|
|
}
|