PHP Interface Webiny\Component\Rest\Interfaces\MiddlewareInterface
Everything is still handled by the component, except a call to the actual service, so this gives you an extra layer
of control over how a service method will be executed.
Whatever you return from getResult method will be passed directly to Rest component as a service call result.
Datei anzeigen
Open project: Webiny/Framework
Interface Usage Examples
Public Methods
Method |
Description |
|
getResult ( RequestBag $requestBag ) : mixed |
This method will be called if Middleware key is defined in Rest config. |
|
Method Details
getResult()
public method
This method will be called if Middleware key is defined in Rest config.
public getResult ( RequestBag $requestBag ) : mixed |
$requestBag |
Webiny\Component\Rest\Response\RequestBag |
Request data from Rest component |
return |
mixed |
|