Re: RFC: Server-Side Request and Response Objects (v2)
| From: | Paul M. Jones | Date: | Sat, 22 Feb 2020 15:23:05 +0000 |
| Subject: | Re: RFC: Server-Side Request and Response Objects (v2) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108720@lists.php.net to get a copy of this message | ||
Hi all,
Off-list discussion with some vendors and consumers indicates that adoption and migration might be
eased by the following changes to ServerResponseInterface:
- Add the following methods:
-
getHeader(string $label) : ?string
- hasHeader(string $label) : bool
- getCookie(string $name) : ?array
- hasCookie(string $name) : bool
- Modify add*(), set*(), and unset*() to be fluent (allow
method chaining)
Since these changes fit in well with the RFC goals, and do not substantially modify prior usage
expectations, John Boehr has applied them to the extension, with documentation and tests.
Further, one evaluator noted that ServerResponseSender::sendContent() did not allow for
iterables/generators as content; that has been remedied as well.
--
Paul M. Jones
pmjones@pmjones.io
http://paul-m-jones.com
Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp
Solving the N+1 Problem in PHP
https://leanpub.com/sn1php