Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Clarify AcceptableViewModelSelector parsing and browser behavior #195

Merged
merged 3 commits into from
Aug 29, 2016
Merged

Clarify AcceptableViewModelSelector parsing and browser behavior #195

merged 3 commits into from
Aug 29, 2016

Conversation

MatthiasKuehneEllerhold
Copy link
Contributor

See #194 for discussion.

}
}
protected $acceptCriteria = [
// Make sure ViewModel is the first as a fallback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every browser will send text/html at a higher priority than */* so as long as a ViewModel with a HTML mimetype is in $acceptCriteria it will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this line to make sure that ViewModel will be the intended fallback for all unmatched parts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. I would then just change the wording slightly as it assumes that I want HTML as the fallback. Maybe "The first model in the list will be used as the default in case of no exact match", or similar ?

@MatthiasKuehneEllerhold
Copy link
Contributor Author

Any news on this PR?

@weierophinney weierophinney self-assigned this Aug 29, 2016
@weierophinney weierophinney merged commit ce311dc into zendframework:master Aug 29, 2016
weierophinney added a commit that referenced this pull request Aug 29, 2016
Clarify AcceptableViewModelSelector parsing and browser behavior
weierophinney added a commit that referenced this pull request Aug 29, 2016
weierophinney added a commit that referenced this pull request Aug 29, 2016
@weierophinney
Copy link
Member

Thank you, @MatthiasKuehneEllerhold.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants