Download the PHP package ed.sukharev/request-headers-param-converter without Composer
On this page you can find all versions of the php package ed.sukharev/request-headers-param-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ed.sukharev/request-headers-param-converter
More information about ed.sukharev/request-headers-param-converter
Files in ed.sukharev/request-headers-param-converter
Download ed.sukharev/request-headers-param-converter
More information about ed.sukharev/request-headers-param-converter
Files in ed.sukharev/request-headers-param-converter
Vendor ed.sukharev
Package request-headers-param-converter
Short Description This param converter for Sensio Framework Extra Bundle adds convenient HTTP headers handling
License MIT
Package request-headers-param-converter
Short Description This param converter for Sensio Framework Extra Bundle adds convenient HTTP headers handling
License MIT
Please rate this library. Is it a good library?
Informations about the package request-headers-param-converter
Request Headers ParamConverter for SensioFrameworkExtraBundle
This package contains simple yet convenient ParamConverter for injecting HTTP headers into controller actions.
Read about SensioFrameworkExtraBundle on its official homepage.
Usage
Define RequestHeader
as a service (in config.yml
):
And in your Controller:
Then, provided following request:
the response will be:
Annotation parameters
ParamConverter annotation receives following parameters as arguments:
- name — name of the header to look for, also used to generate controller action argument name
- class — defines type of the argument. By default, all headers received as strings.
- isOptional — when header is missing, and this is set to false, then
\EdSukharev\App\ParamConverter\MissingHeaderException
will be thrown, otherwise argument value will be set to null. - converter — has to be
request_header_converter
for this request parameter to be handled by this library.
All versions of request-headers-param-converter with dependencies
PHP Build Version
Package Version
The package ed.sukharev/request-headers-param-converter contains the following files
Loading the files please wait ....