. // }}} /** * ActivityPub implementation for GNU social * * @package GNUsocial * @category ActivityPub * * @author Diogo Peralta Cordeiro <@diogo.site> * @copyright 2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace Plugin\ActivityPub\Util\Response; use App\Entity\Note as GSNote; use Plugin\ActivityPub\Util\Model\Note as ModelNote; use Plugin\ActivityPub\Util\TypeResponse; /** * Provides a response in application/ld+json to GSNotes * * @copyright 2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ abstract class NoteResponse { /** * Provides a response in application/ld+json to GSNotes * * @param int $status The response status code */ public static function handle(GSNote $note, int $status = 200): TypeResponse { return new TypeResponse(json: ModelNote::toJson($note), status: $status); } }