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:----AffwXZ9wzYdFnw3WJ1fJjiK4K0R6Xh08NISbKokMpI/+zbkYl2u2alL0gT53s+x0QzfRJstJgivKU2/cS8qTni6FXtwuz4JA8zcLgiOShvV6GmbmWjnLJD876/F5ZK+2BdqSPdiYD6khsNmrJHjU3OZq2T9ie8Kkx2UeB8ye852DROuYYChIyAxU5AXi2HavbTrOKZVJaiN96n6cZ3lKGdi4P21R18BjfDUkPByrIIMOdcwa3OSYlpCJ/E5bQb0peXBCNsc8CanXDsc4RQEg8jZ6KJTcsiu3MN7LFtnM711EwMD5TTPmdCtnqm+prM0k8vqKUk+Q0sV94aniBPkZq8VqlatQ6xrlG8H8H46PPYAofMA7d+8W4O0nmhEIXwGf4F48/BqFX0deWa1hBkH5w80F/vRCflSXsAxp3wapurbMNKJGKg431aZUpujnDlKSQU7M2Rtdi4V5PsBNAA7lzKyeCGXgAQ37FMABu5Wnor99gxFqX6wBtnZ/mSga3YUTv7uyrOIAlO1x7I3HkUp3A0f1Ma9C/fLL7Uo8unDhp/MEOImL3cGVpLaEcyHi8j19wz0apZlRIYzIua8bjMjrdJZ1J4IxVwrYEW2wyhfTYMWzkFvaGLT2rP96vYfKtq9gBg6NEsEvGbcuh3G/rYsoJfYYWh2Ym3FYmgtXI2+7LL8=----ATTACHMENT:----ODQ1NzU3ODQyNDQxNzgyOSA4ODg0MTM5MDI3Njk0ODIzIDI0ODgzODg5OTI0MTA5MzM=