Runs an application invoking all the PSR7 middleware and the registered application.
stringDefault class name for new event objects.
Cake\Event\EventManagerInterface|nullInstance of the Cake\Event\EventManager this object is using to dispatch inner events.
Cake\Core\HttpApplicationInterfaceCake\Http\RunnerConstructor
Application bootstrap wrapper.
Wrapper for creating and dispatching events.
Emit the response using the PHP SAPI.
Get the current application.
Get the application's event manager or the global one.
Run the request/response through the Application and its middleware.
Set the application's event manager.
__construct(Cake\Core\HttpApplicationInterface $app, Cake\Http\Runner|null $runner = null)
Constructor
Cake\Core\HttpApplicationInterface $app The application to use.
Cake\Http\Runner|null $runner optional Application runner.
bootstrap(): void
Application bootstrap wrapper.
Calls the application's bootstrap() hook. After the application the plugins are bootstrapped.
voiddispatchEvent(string $name, array|null $data = null, object|null $subject = null): Cake\Event\EventInterface
Wrapper for creating and dispatching events.
Returns a dispatched event.
string $name Name of the event.
array|null $data optional Any value you wish to be transported with this event to it can be read by listeners.
object|null $subject optional The object that this event applies to ($this by default).
Cake\Event\EventInterfaceemit(Psr\Http\Message\ResponseInterface $response, Laminas\HttpHandlerRunner\Emitter\EmitterInterface|null $emitter = null): void
Emit the response using the PHP SAPI.
Psr\Http\Message\ResponseInterface $response The response to emit
Laminas\HttpHandlerRunner\Emitter\EmitterInterface|null $emitter optional The emitter to use. When null, a SAPI Stream Emitter will be used.
voidgetApp(): Cake\Core\HttpApplicationInterface
Get the current application.
Cake\Core\HttpApplicationInterfacegetEventManager(): Cake\Event\EventManagerInterface
Get the application's event manager or the global one.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
Cake\Event\EventManagerInterfacerun(Psr\Http\Message\ServerRequestInterface|null $request = null, Cake\Http\MiddlewareQueue|null $middlewareQueue = null): Psr\Http\Message\ResponseInterface
Run the request/response through the Application and its middleware.
This will invoke the following methods:
Psr\Http\Message\ServerRequestInterface|null $request optional The request to use or null.
Cake\Http\MiddlewareQueue|null $middlewareQueue optional MiddlewareQueue or null.
Psr\Http\Message\ResponseInterfaceRuntimeExceptionsetEventManager(Cake\Event\EventManagerInterface $eventManager): $this
Set the application's event manager.
If the application does not support events, an exception will be raised.
Cake\Event\EventManagerInterface $eventManager The event manager to set.
$thisInvalidArgumentExceptionDefault class name for new event objects.
stringInstance of the Cake\Event\EventManager this object is using to dispatch inner events.
Cake\Event\EventManagerInterface|nullCake\Core\HttpApplicationInterfaceCake\Http\Runner
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.Http.Server.html