Skip to content

Commit 91af3dc

Browse files
committed
Merge pull request #9 from gsc-frank/conf_fix
Fix 'accept_filters' conf issue.
2 parents 80ae1e1 + c736ef1 commit 91af3dc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

config/module.config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
'zf-api-problem' => array(
3131
// Accept types that should allow ApiProblem responses
32-
// 'accept_filter' => $stringOrArray,
32+
// 'accept_filters' => $stringOrArray,
3333

3434
// Array of controller service names that should enable the ApiProblem render.error listener
3535
//'render_error_controllers' => array(),

docs/ref/api-problem-listener.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This latter bit, the ``Accept`` header matching, is configurable. If you want to
5050
allow an API-Problem response for other than the default set of mediatypes
5151
(``application/hal+json``, ``application/api-problem+json``, and
5252
``application/json``), you can do so via your configuration. Set the value in
53-
the ``accept_filter`` subkey of the ``zf-hal`` configuration; the value
53+
the ``accept_filters`` subkey of the ``zf-hal`` configuration; the value
5454
should be a comma-separated set of mimetypes.
5555

5656
.. code-block:: php
@@ -59,7 +59,7 @@ should be a comma-separated set of mimetypes.
5959
return array(
6060
'zf-hal' => array(
6161
// ...
62-
'accept_filter' => 'application/json,text/json',
62+
'accept_filters' => 'application/json,text/json',
6363
),
6464
);
6565

src/ZF/ApiProblem/Factory/ApiProblemListenerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ApiProblemListenerFactory implements FactoryInterface
1818
*/
1919
public function createService(ServiceLocatorInterface $serviceLocator)
2020
{
21-
$config = $serviceLocator->has('Config');
21+
$config = $serviceLocator->get('Config');
2222
$filters = null;
2323

2424
if (isset($config['zf-api-problem'])

0 commit comments

Comments
 (0)