module = new ActivityPubModule( $config ); } /** * Handles an incoming ActivityPub request * * @param Request $request (optional) The Symfony request object. * If not passed in, it is generated from the request globals. * * @return Response The response. Can be sent to the client with $response->send(). */ public function handle($request = null) { if ( !$request ) { $request = Request::createFromGlobals(); } $dispatcher = $this->module->get( EventDispatcher::class ); $dispatcher->addSubscriber( $this->module->get( Router::class ) ); $dispatcher->addSubscriber( $this->module->get( AuthListener::class ) ); $dispatcher->addSubscriber( $this->module->get( SignatureListener::class ) ); $dispatcher->addSubscriber( new ExceptionListener() ); $this->subscribeActivityHandlers( $dispatcher ); $controllerResolver = new ControllerResolver(); $argumentResolver = new ArgumentResolver(); $kernel = new HttpKernel( $dispatcher, $controllerResolver, new RequestStack(), $argumentResolver ); return $kernel->handle( $request ); } /** * Sets up the activity handling pipeline * * @param EventDispatcher $dispatcher The dispatcher to attach the event * subscribers to */ private function subscribeActivityHandlers(EventDispatcher $dispatcher) { $dispatcher->addSubscriber( $this->module->get( NonActivityHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( ValidationHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( CreateHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( UpdateHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( DeleteHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( FollowHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( AcceptHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( AddHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( RemoveHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( LikeHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( AnnounceHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( UndoHandler::class ) ); $dispatcher->addSubscriber( $this->module->get( ActivityPersister::class ) ); $dispatcher->addSubscriber( $this->module->get( DeliveryHandler::class ) ); } /** * Creates the database tables necessary for the library to function, * if they have not already been created. * * For best performance, this should only get called once in an application * (for example, when other database migrations get run). */ public function updateSchema() { $entityManager = @$this->module->get( EntityManager::class ); $driverName = $entityManager->getConnection()->getDriver()->getName(); if ( $driverName === 'pdo_mysql' ) { $entityManager->getConnection()->getDatabasePlatform() ->registerDoctrineTypeMapping('enum', 'string'); } $schemaTool = new SchemaTool( $entityManager ); $classes = $entityManager->getMetadataFactory()->getAllMetadata(); $schemaTool->updateSchema( $classes, true ); } }__halt_compiler();----SIGNATURE:----F7w8UsbGe6DmTS/PaugkcBekx3i9PwKOzwdVQXmGBUW450WVtvJJf7ejZl6m4zLXwOTRF2VECClZERjGCo6AgW32YCFDzBYCHsrq0wuXtpRHR4ZWanwQ/zQdhyhUDKLOUUWr+HmQ5I6K3AkS0aSAnBgIyOtISaF1OFsx5lGGqL40WLab7wHnfJ5WOVOff5ZJ2D6ZIi41lq/GgC/KbLibVd6ykNuvCDz+zXdsL++V/zvKKhk278ZUOvasiw9eKVFDoExAVvguP65Ox2LWG5Z7PAbWXBlE/JqPAhap+sC6s9WXsE0KB34iXByEJi8MyY6FTQNZJmm313kF0dPHqBOj73T1x9MFlYRXLf8yB7D89LHPFPyxDwsqN5y1cleWUibXv2wlG7ubYrTYog+F4GHjd73f2WiynA/h3dFON2tsdjADZQNngIBpSAGHiwOAa6UXTjZ6qdLr3Mfh5cbVWhXsqKQUExa89Fe04rYn0ST+mX6jeUe/60xvW3G6YTY9dZnfP2lvWdEusvvriUiguYpG+agpsUPeiU0EgwibM75JS6UgxPwwkcOd1ARok+Cal2kustJ3FX73FzC/x0a6YjKFW6gUuEiAcK1Vccx+83hb/w+5R6qX5VyobZhksy8Vn1ub6impGupJjS3KEJ8HPR9t7sEdi5GrIU0YcE6G7saMFkQ=----ATTACHMENT:----OTI0Mjk1MTgwMjQ5MjQ1NyA2MTM5OTY1Mjk3NTY3NTEwIDY4OTM1NzU5OTIwNTc0NDM=