/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Http
NameSizeModeActions
Client/-0755rm
Cookie/-0755rm
Exception/-0755rm
Middleware/-0755rm
Session/-0755rm
TestSuite/-0755rm
BaseApplication.php93880644editdlrm
CallbackStream.php15750644editdlrm
Client.php256240644editdlrm
composer.json15090644editdlrm
ContentTypeNegotiation.php52730644editdlrm
ControllerFactory.php2300644editdlrm
ControllerFactoryInterface.php15340644editdlrm
CorsBuilder.php60250644editdlrm
FlashMessage.php68120644editdlrm
LICENSE.txt12040644editdlrm
MiddlewareApplication.php17910644editdlrm
MiddlewareQueue.php91130644editdlrm
README.md33920644editdlrm
Response.php512180644editdlrm
ResponseEmitter.php89400644editdlrm
Runner.php30640644editdlrm
Server.php55520644editdlrm
ServerRequest.php559690644editdlrm
ServerRequestFactory.php130810644editdlrm
Session.php209880644editdlrm
Uri.php50270644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Http/Server.php (5552B)
app = $app; $this->runner = $runner ?? new Runner(); } /** * Run the request/response through the Application and its middleware. * * This will invoke the following methods: * * - App->bootstrap() - Perform any bootstrapping logic for your application here. * - App->middleware() - Attach any application middleware here. * - Trigger the 'Server.buildMiddleware' event. You can use this to modify the * from event listeners. * - Run the middleware queue including the application. * * @param \Psr\Http\Message\ServerRequestInterface|null $request The request to use or null. * @param \Cake\Http\MiddlewareQueue|null $middlewareQueue MiddlewareQueue or null. * @return \Psr\Http\Message\ResponseInterface * @throws \RuntimeException When the application does not make a response. */ public function run( ?ServerRequestInterface $request = null, ?MiddlewareQueue $middlewareQueue = null ): ResponseInterface { $this->bootstrap(); $request = $request ?: ServerRequestFactory::fromGlobals(); $middleware = $this->app->middleware($middlewareQueue ?? new MiddlewareQueue()); if ($this->app instanceof PluginApplicationInterface) { $middleware = $this->app->pluginMiddleware($middleware); } $this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); $response = $this->runner->run($middleware, $request, $this->app); if ($request instanceof ServerRequest) { $request->getSession()->close(); } return $response; } /** * Application bootstrap wrapper. * * Calls the application's `bootstrap()` hook. After the application the * plugins are bootstrapped. * * @return void */ protected function bootstrap(): void { $this->app->bootstrap(); if ($this->app instanceof PluginApplicationInterface) { $this->app->pluginBootstrap(); } } /** * Emit the response using the PHP SAPI. * * @param \Psr\Http\Message\ResponseInterface $response The response to emit * @param \Laminas\HttpHandlerRunner\Emitter\EmitterInterface|null $emitter The emitter to use. * When null, a SAPI Stream Emitter will be used. * @return void */ public function emit(ResponseInterface $response, ?EmitterInterface $emitter = null): void { if (!$emitter) { $emitter = new ResponseEmitter(); } $emitter->emit($response); } /** * Get the current application. * * @return \Cake\Core\HttpApplicationInterface The application that will be run. */ public function getApp(): HttpApplicationInterface { return $this->app; } /** * Get the application's event manager or the global one. * * @return \Cake\Event\EventManagerInterface */ public function getEventManager(): EventManagerInterface { if ($this->app instanceof EventDispatcherInterface) { return $this->app->getEventManager(); } return EventManager::instance(); } /** * Set the application's event manager. * * If the application does not support events, an exception will be raised. * * @param \Cake\Event\EventManagerInterface $eventManager The event manager to set. * @return $this * @throws \InvalidArgumentException */ public function setEventManager(EventManagerInterface $eventManager) { if ($this->app instanceof EventDispatcherInterface) { $this->app->setEventManager($eventManager); return $this; } throw new InvalidArgumentException('Cannot set the event manager, the application does not support events.'); } }