ApiProblemListener

Provides a listener on the render event, at high priority.

If the MvcEvent represents an error, then its view model and result are replaced with a RestfulJsonModel containing an API-Problem payload.

### Methods

## Constructor

    __construct(string $filter)

Set the accept filter, if one is passed

### Parameters

#### $filter

`string`

## attach()

    attach(\Zend\EventManager\EventManagerInterface $events)

### Parameters

#### $events

`\Zend\EventManager\EventManagerInterface`

## detach()

    detach(\Zend\EventManager\EventManagerInterface $events)

### Parameters

#### $events

`\Zend\EventManager\EventManagerInterface`

## Listen to the render event

    onRender(\Zend\Mvc\MvcEvent $e)

Static

### Parameters

#### $e

`\Zend\Mvc\MvcEvent`