Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 1014 Bytes

01. Installation and configuration.md

File metadata and controls

16 lines (12 loc) · 1014 Bytes

Installation and Configuration

Starting from ZfrRest 0.4.*, ZfrRest has very few options. Once you have retrieved it from Composer, all the available options can be configured by copying the zfr_rest.global.php.dist file into your config/autoload folder.

Here are the possible options:

  • exception_map: allows to map an exception to a ZfrRest exception. It will automatically be catched by the listener and create an appropriate JSON response. You can learn more about error handling [in this section](/docs/01. Installation and configuration.md).

  • register_http_method_override_listener: in some companies, or if you are using standard HTML forms, you can be limited in the choice of HTTP verbs (most of the time, only POST and GET). By enabling this option, you can now send a header X-HTTP-Method-Override whose value is the HTTP method. ZfrRest will automatically replace the verb of the request.

  • Continue to [Controllers](/docs/02. Controllers.md)

  • Back to the Index