PSR-7 “attributes” on Response object
问题 I'm developing using PSR-7 (with Zend Expressive). I figured out the method ServerRequestInterface::withAttribute() and I was wondering why the object Response doesn't have one. I'd like to pass metadata through middlewares after processing, on "response side". Is there somehow to pass "attributes" on Response for post-processing? What's is the best way, following the architecture guidelines, to achieve that? 回答1: The PSR-7 specification defines attributes only for server requests. They are