__invoke()
getController()
getDefaultMatchAgainst()
getDefaultViewModelName()
getViewModel()
getViewModelName()
match()
setController()
setDefaultMatchAgainst()
setDefaultViewModelName()
extractViewModelName()
getEvent()
getRequest()
injectViewModelName()
$controller
$defaultMatchAgainst
$defaultViewModelName
$event
$request
INJECT_VIEWMODEL_NAME
Controller Plugin to assist in selecting an appropriate View Model type based on the User Agent's accept header.
__invoke(array $matchAgainst, bool $returnDefault, \Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null $resultReference) : \Zend\View\Model\ModelInterface | null
array(optional) The Array to match against
bool(optional) If no match is available. Return default instead
\Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePartnull(optional) The object that was matched
\Zend\Mvc\Exception\InvalidArgumentException |
If the supplied and matched View Model could not be found |
|---|
getController() : null | \Zend\Stdlib\DispatchableInterface
| inherited_from | \Zend\Mvc\Controller\Plugin\AbstractPlugin::getController() |
|---|
getDefaultMatchAgainst() : array | null
arraynull
getDefaultViewModelName() : string
stringgetViewModel(array $matchAgainst, bool $returnDefault, \Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null $resultReference) : \Zend\View\Model\ModelInterface | null
array(optional) The Array to match against
bool(optional) If no match is available. Return default instead
\Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePartnull(optional) The object that was matched
\Zend\Mvc\Exception\InvalidArgumentException |
If the supplied and matched View Model could not be found |
|---|
getViewModelName(array $matchAgainst, bool $returnDefault, \Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null $resultReference) : \Zend\View\Model\ModelInterface | null
array(optional) The Array to match against
bool(optional) If no match is available. Return default instead
\Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePartnull(optional) The object that was matched.
\Zend\View\Model\ModelInterfacenullReturns null if $returnDefault = false and no match could be madematch(array $matchAgainst) : \Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart | null
array(optional) The Array to match against
\Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePartnullThe object that was matchedsetController(\Zend\Stdlib\DispatchableInterface $controller) : void
| inherited_from | \Zend\Mvc\Controller\Plugin\AbstractPlugin::setController() |
|---|
\Zend\Stdlib\DispatchableInterface
setDefaultMatchAgainst(array $matchAgainst) : \Zend\Mvc\Controller\Plugin\AcceptableViewModelSelector
array(optional) The Array to match against
\Zend\Mvc\Controller\Plugin\AcceptableViewModelSelectorprovides fluent interfacesetDefaultViewModelName(string $defaultViewModelName) : \Zend\Mvc\Controller\Plugin\AcceptableViewModelSelector
stringThe default View Model name
\Zend\Mvc\Controller\Plugin\AcceptableViewModelSelectorprovides fluent interfaceextractViewModelName(\Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart $res) : string
injectViewModelName(string $modelAcceptString, string $modelName) : string
string
string
string$controller : null | \Zend\Stdlib\DispatchableInterface
| inherited_from | \Zend\Mvc\Controller\Plugin\AbstractPlugin::$$controller |
|---|
$defaultMatchAgainst : Array
$defaultViewModelName : string
INJECT_VIEWMODEL_NAME : string