Runs an application invoking all the PSR7 middleware and the registered application.
__construct( Cake\Core\HttpApplicationInterface $app )
Constructor
Cake\Core\HttpApplicationInterface
$app
bootstrap( )
Application bootstrap wrapper.
Calls bootstrap()
and events()
if application implements EventApplicationInterface
. After the application is bootstrapped and events are attached, plugins are bootstrapped and have their events attached.
emit( Psr\Http\Message\ResponseInterface $response , Zend\Diactoros\Response\EmitterInterface $emitter null )
Emit the response using the PHP SAPI.
$response
$emitter
optional null The emitter to use. When null, a SAPI Stream Emitter will be used.
eventManager( Cake\Event\EventManager $events null )
Get/set the application's event manager.
If the application does not support events and this method is used as a setter, an exception will be raised.
Cake\Event\EventManager
$events
optional null Cake\Event\EventManager
|Cake\Http\Server
Cake\Event\EventDispatcherInterface::eventManager()
getApp( )
Get the current application.
Cake\Core\HttpApplicationInterface
getEventManager( )
Get the application's event manager or the global one.
Cake\Event\EventManagerInterface
run( Psr\Http\Message\ServerRequestInterface $request null , Psr\Http\Message\ResponseInterface $response null )
Run the request/response through the Application and its middleware.
This will invoke the following methods:
$request
optional null $response
optional null setEventManager( Cake\Event\EventManager $events )
Get/set the application's event manager.
If the application does not support events and this method is used as a setter, an exception will be raised.
Cake\Event\EventManager
$events
setRunner( Cake\Http\Runner $runner )
Set the runner
Cake\Http\Runner
$runner
dispatchEvent( string $name , array|null $data null , object|null $subject null )
Wrapper for creating and dispatching events.
Returns a dispatched event.
$name
$data
optional null Any value you wish to be transported with this event to it can be read by listeners.
$subject
optional null The object that this event applies to ($this by default).
Cake\Event\Event
getEventManager() |
protected Cake\Core\HttpApplicationInterface
protected Cake\Http\Runner
© 2005–2018 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/3.6/class-Cake.Http.Server.html