Summary: |
|
---|
[Corona] Accept header info retrieval in the Request class
Review Request #268 — Created Jan. 29, 2014 and submitted
Information | |
---|---|
leo | |
Lunr | |
master | |
19739 | |
Reviewers | |
lunr | |
Corona: Add Accept header info retrieval from the Request class Methods for returning the best match among content type, language and encoding given a set of supported values for each of the above.
unit tests, requests with postman
Change Summary:
Adds implementation in CliRequest & function declarations in RequestInterface
-
-
src/Lunr/Shadow/CliRequest.php (Diff revision 2) nitpick: Can you add dashes in there? like 'accept-format', or underscores are also fine, like 'accept_format' (but dashes are more common). Makes it visually less frightening :) Also, since you're not really modifying the data here, there's no need to store it twice. Just fetch it directly from the ast when you need it, it's meant to be immutable anyway
Change Summary:
adds dashes to the command line parameters, removes storing the accept header information twice
Diff: |
Revision 3 (+398 -1) |
---|
-
last nitpick, almost shipit ;) Can you add @backupGlobals to the clirequest tests, since you touch $_SERVER?
Change Summary:
adds the @backupglobals annotation, also adds empty implementation blocks in the ResqueRequest class
Diff: |
Revision 4 (+473 -6) |
---|
-
Code wise this is totally fine now, but phpcs is reporting a few violations too much for me to just merge it. Can you have a look at it pls?
Change Summary:
fixes phpcs errors
Diff: |
Revision 5 (+487 -6)
|
---|