Cors
in package
implements
FilterInterface
Tags
Table of Contents
Interfaces
- FilterInterface
- Filter interface
Properties
Methods
- __construct() : mixed
- after() : ResponseInterface|void
- Allows After filters to inspect and modify the response object as needed. This method does not allow any way to stop execution of other after filters, short of throwing an Exception or Error.
- before() : ResponseInterface|string|void
- Do whatever processing this filter needs to do.
- createCorsService() : void
Properties
$cors
private
Cors|null
$cors
= null
Methods
__construct()
public
__construct([array{allowedOrigins?: list, allowedOriginsPatterns?: list, supportsCredentials?: bool, allowedHeaders?: list, exposedHeaders?: list, allowedMethods?: list, maxAge?: int} $config = [] ]) : mixed
Parameters
-
$config
: array{allowedOrigins?: list
, allowedOriginsPatterns?: list = [], supportsCredentials?: bool, allowedHeaders?: list , exposedHeaders?: list , allowedMethods?: list , maxAge?: int}
Tags
after()
Allows After filters to inspect and modify the response object as needed. This method does not allow any way to stop execution of other after filters, short of throwing an Exception or Error.
public
after(RequestInterface $request, ResponseInterface $response[, array<int, string>|null $arguments = null ]) : ResponseInterface|void
Parameters
- $request : RequestInterface
- $response : ResponseInterface
- $arguments : array<int, string>|null = null
Return values
ResponseInterface|voidbefore()
Do whatever processing this filter needs to do.
public
before(RequestInterface $request[, array<int, string>|null $arguments = null ]) : ResponseInterface|string|void
Parameters
- $request : RequestInterface
- $arguments : array<int, string>|null = null
Return values
ResponseInterface|string|voidcreateCorsService()
private
createCorsService(array<int, string>|null $arguments) : void
Parameters
- $arguments : array<int, string>|null