This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ use Zend\Mvc\Controller\AbstractActionController;
44
44
class SomeController extends AbstractActionController
45
45
{
46
46
protected $acceptCriteria = [
47
- // Make sure ViewModel is the first as a fallback
48
47
\Zend\View\Model\ViewModel::class => [
49
48
'text/html',
50
49
'application/xhtml+xml',
@@ -73,10 +72,12 @@ class SomeController extends AbstractActionController
73
72
74
73
The above would return a standard ` Zend\View\Model\ViewModel ` instance if no
75
74
criterias are met, and the specified view model types if a specific criteria
76
- is met. Rules are matched in order, with the first match "winning."
75
+ is met. Rules are matched in order, with the first match "winning".
76
+ Make sure to put your fallback view model * first* as a fallback for unknown
77
+ content types or ` */* ` .
77
78
78
- > Browsers are sending ` */* ` as last part of the Accept header so you have to define every
79
- > acceptable view model and their Accept-Header part. Otherwise the first view model will be used .
79
+ > Browsers are sending ` */* ` as last content type of the Accept header so you have to define every
80
+ > acceptable view model and their content type .
80
81
81
82
## Forward Plugin
82
83
You can’t perform that action at this time.
0 commit comments