我可以将 PSR-7 StreamInterfaces 与 PHP 的原生流功能一起使用吗?

Can I use PSR-7 StreamInterfaces with PHP's native stream functions?

我在问,因为我正在使用像 im0rtality/jsonstreamingparser 这样的包,它依赖于输入是原生 php 流,例如通过调用 get_resource_type().

如果不是直接的,我的搜索没有出现在 packagist 上的包装器库吗?

guzzle/psr7 通过其 StreamWrapper class 提供所需的功能:https://github.com/guzzle/psr7/blob/master/src/StreamWrapper.php