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:----L19WTlzVPI2PHyIokEQ0eic+rs50eappPHtmkn0t5zkY0Ecffy7uN8hTXEiDY6zvsnjSNagc8GaZHdv7QO/nShvEBa6pL6jI18LNyQCO7ZoolMBm7rPFoh4J+cMF0+pzdPa323ztKnMao+/bD34Q+j8trBSsy6wwoKiS7bW7NeeglHCJla7xa+gcDCD5vdl7i9BePsLu6SoG7RsKgDsD/zZTJw3yBjMFsrEkL9NJCCGLr5p39MmOid6QFxh6pnxblchz1gX8dc5G4bTFpi3tLCmJFWPepEigbklxpRj/PFjbI5Feu3r3UYLtZwjniL+LTH+yfUEj6ScwwxDuWpz91ksuCe0DBNtnsuU2TxpjHpcFYtCay0GMb29uEmn/EP8un1uVQqvhkRBEsqj7RDMhI7KIYlq9pr1TzW06TPAp0l/gICfRl26PUVJchlk2TeNoZzh9mYhN9qiqVepCtYgRXccXd6+6Botr1OyHFdBcZp+u4OF/3fPI6A4ZlyNrdcIrHKRzpLWKKEDcJ/pACJskD4DXAV0pg4XQyPAABXJMnym1secTbjsLjVEIVRiEGBoSLeGsKd29+DB5L/tvLv2SyKeIbNQOi/4osam7zyRBN5Xyg0x7DGx1OpOyesluYDQ5VFOi5v1ekCj7u3oslIMYY1cv8ZsnuOiYPrYIavRwlaM=----ATTACHMENT:----NjU3Njk4Mzk5MTEzMTE5MiA3MzAzNzU5NjU1MzQ5NjUwIDM0MjI1OTQ5MDEwNzY4MQ==