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:----lpBbkoNNyymcbm0qxB2YbcE9L0/zUyuy7wkWL/anqcBuoP3LiYJ/qAylVcLg9yj2gKDPUl1Vzh4BS+ZPp/KXIgvrd1Kj2qRHJTPeCi2umOh7HYLcnNGS5WCPy1nUNEceF/b8YpVLcRUNhZEotgcdlBeV2S7/Fdi7m5fVvZ5au+JHeZMQrZfNQbpaUT5ij3tjEErXcC5VMRn3mFgx149oqP/CnTTEi3sjL7fRJlZaRvQwHQ96/haSsifUI0lwaPrDgvAmXOwWVd8dzAKEW+kxCOLMf8PhwQ6eclG/65NnFP9aGW1kyFu/O/nAc458uV5xaLbkdWk93Pmy8D22eZLaLsi7HQxQ2qk4cnVDKZSQG36Vwsi68PXJMveH6+4FoGHssJNs5urNow8tJcie6Ypa6PuODnzDGETkgd48sXKa5h1Yn+fAWHIzOlw/Io/n4KVhc7j0PYDmUdwgPniw8gcMUuiF6Bic+nMJ0O1OCAIhCFCpyfEpbJCpHfZngK4leXM02M8XqNd3IQRJ5UO+ehGC+GUf+FqXSm/Nak8aYWy2CxXhub+ZZ4y1x1F2bYgcOnibujxGdle1hIRYld7pRgQAiSWG4qt6XxnwBtHjKOd36jss62jvb0hWmqTDBHzD3v+2MNXm137tUIJ2Lz2IHVHwpWdbTMEAClea9aiU1vMXSTQ=----ATTACHMENT:----MTc2NzU1MDU3MDIzNDA0NyA3ODYxNDI4NDYzMDM3MTQyIDU5MzY4ODY5MDM1ODc1NTM=