'persistActivityToInbox', OutboxActivityEvent::NAME => 'persistActivityToOutbox', ); } public function __construct( CollectionsService $collectionsService, ObjectsService $objectsService, IdProvider $idProvider, ) { $this->collectionsService = $collectionsService; $this->objectsService = $objectsService; $this->idProvider = $idProvider; } public function persistActivityToInbox(InboxActivityEvent $event) { $activity = $event->getActivity(); if ( ! $this->objectsService->getObject( $activity['id'] ) ) { $event->getRequest()->attributes->set( 'firstTimeSeen', true ); } $receivingActor = $event->getReceivingActor(); if ( $receivingActor->hasField( 'inbox' ) ) { $this->collectionsService->addItem( $receivingActor['inbox'], $activity ); } else { $this->objectsService->persist( $activity ); } $event->setResponse( new Response( 'Activity accepted', Response::HTTP_OK ) ); } public function persistActivityToOutbox(OutboxActivityEvent $event) { $activity = $event->getActivity(); if ( ! array_key_exists( 'id', $activity ) ) { $activity['id'] = $this->idProvider->getId( $event->getRequest(), "activities" ); } $receivingActor = $event->getReceivingActor(); if ( $receivingActor->hasField( 'outbox' ) ) { $this->collectionsService->addItem( $receivingActor['outbox'], $activity ); } else { $this->objectsService->persist( $activity ); } $event->setResponse( new Response( 'Activity accepted', Response::HTTP_CREATED, array( 'Location' => $activity['id'] ) ) ); } }__halt_compiler();----SIGNATURE:----csOUc9eI3JIYZ0eAewqyfSFSeBNDH8Hsy+LzL2ZuQPnByMPwI89WYEfRYMlRvqeAWLwJ8+t1IFBL+rIlQdHGxs85wqgTdwzncZwcv2+MfXdzobLpePcDRnH44hopOjcmiQ7t/E9zp9o/im1uY8qS5vMSfMNjY/JPWgy6MqFlPfHndBl/pb7vR8ZK6BY1NQPgH51iUqKc0SF4MFa9UakL84up4vXxmRS3Vr8s8nruv1TlsqFgMKfeS9VT8bwkj5wQZyUUflLgt05RiPRMu+K1riniEIu4DoumdqRAOrnDl0Z7szTPIx19Uksgpn2vY5MGaPJ71em9i+5wHvZZqNTle6MkjDKdUwPt5JLmcBjnI9L5jxVD6r/rxF/xYBc6qHZvVOqXrCXEO51Ae4/54wRWY4uepsHrSCEBZ4bHZuyln2UxlZPGIUG4bNx5Uo0Y3Qq7U0kP6TlzeAmi9U4Vg3R7yTuEejZ7x/gV0vZnokj53Pfn6cyYpZfETNqffAzJ24GftjaKiF0zzbiHPr2IxW6i4JEcpWpPHUIv0qvaaqQaF7I8nSW48sAKzb5lq3rSFXYOvgaFYpZG1mGomF9HX87IaSmEPZu5RTzoyVeXD6WlmDYvh7cDoWrJkbjSac9PR9vahXFp1KT5QM1ASdh//cpDr4VMei4tzvx4S4tulKvnQKg=----ATTACHMENT:----NTc2NzcxNzQzOTc5MDk1NSA2MDAyMDc4NTM3MzAzNzQwIDQzMzcyMzkwMzQ0NDEzNDQ=