/**
* Returns the remaining contents in a string
*
* @return string
* @throws \RuntimeException if unable to read or an error occurs while
* reading.
*/
public function getContents();
这里的 remaining contents
指的是不是当前位置之后的内容?
不是返回全部内容,而是流指针之后,如果要获取全部内容,用
__toString
, 可以参考下zend-diactoros
的实现。https://github.com/zendframew...