Filters/define action contexts

Filters the array of action contexts as passed to Zend Framework's ContextSwitch::addActionContexts().

Arguments

array $contexts {{#if
| (optional)}}
Array of action contexts (see below for details).
{{#if: | Default: {{{default}}}}}
Zend_Controller_Action_Helper_ContextSwitch $contextSwitcher {{#if
| (optional)}}
Zend Framework's ContextSwitch helper.
{{#if: | Default: {{{default}}}}}

Example

The $contexts array looks like this:

array(
    'some-action' => array('xml'),
    'another-action' => array('xml', 'json')
);

The array specifies which response contexts are available for each controller action. For information about defining response contexts themselves, see the documentation for define_response_contexts.