DeleteActor.php 580 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Transformer\ActivityPub\Verb;
  3. use App\Profile;
  4. use League\Fractal;
  5. class DeleteActor extends Fractal\TransformerAbstract
  6. {
  7. public function transform(Profile $profile)
  8. {
  9. return [
  10. '@context' => 'https://www.w3.org/ns/activitystreams',
  11. 'id' => $profile->permalink('#delete'),
  12. 'type' => 'Delete',
  13. 'actor' => $profile->permalink(),
  14. 'to' => [
  15. 'https://www.w3.org/ns/activitystreams#Public'
  16. ],
  17. 'object' => $profile->permalink()
  18. ];
  19. }
  20. }