Simplifying message headers #256

Merged
merged 1 commit into from Feb 14, 2014

Conversation

Projects
None yet
3 participants
Contributor

mtdowling commented Feb 13, 2014

This PR simplifies message headers so that they are no longer a
HeaderFieldValuesInterface object. This change adds a new boolean argument
to MessageInterface::getHeader() that allows one to retrive a header as
a string (the default) or as an array of string values.

Simplifying message headers
This PR simplifies message headers so that they are no longer a
HeaderFieldValuesInterface object. This change adds a new boolean argument
to `MessageInterface::getHeader()` that allows one to retrive a header as
a string (the default) or as an array of string values.
Contributor

mtdowling commented Feb 14, 2014

@philsturgeon Can you merge this?

philsturgeon pushed a commit that referenced this pull request Feb 14, 2014

@philsturgeon philsturgeon merged commit 794c517 into php-fig:master Feb 14, 2014

A "Clean Code" nitpick here: adding boolean parameters is (in general) less desirable than adding a separate method. If we keep the "as array" behavior I suggest removing the parameter and adding getHeaderAsArray() in its place.

@mtdowling mtdowling deleted the mtdowling:message_header_updates branch Jun 6, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment