andig
andig

Reputation: 13906

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

I'm asking as I'm using packages like im0rtality/jsonstreamingparser that depend on the input being a native php stream, e.g. by calling get_resource_type().

If not directly, is there any wrapper library on packagist that my search did not turn up?

Upvotes: 2

Views: 972

Answers (1)

andig
andig

Reputation: 13906

guzzle/psr7 provides the desired funtionality by its StreamWrapper class: https://github.com/guzzle/psr7/blob/master/src/StreamWrapper.php

Upvotes: 4

Related Questions