You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not issue, it is rather a question. Why not add this functionality (StreamWrapper) in the very class of the stream? These classes, in fact, are wrapper?
public function __call($name, $arguments)
{
if (false !== strpos($name, 'stream_')) {
$name = substr($name, 7);
}
$method = strtolower(str_replace('_', '', $name));
if (! method_exists($this, $method)) {
throw new InvalidArgumentException(
sprintf('Method "%s" doesn\'t exist', $name)
);
}
return call_user_func_array([$this, $method], $arguments);
}
The text was updated successfully, but these errors were encountered:
I think the classes that implement StreamInterface, already are wrappers. Your class psr7\StreamWrapper, in fact, is the adapter. Add to your Streams method _call. Then you will not need an adapter.
It is not issue, it is rather a question. Why not add this functionality (StreamWrapper) in the very class of the stream? These classes, in fact, are wrapper?
The text was updated successfully, but these errors were encountered: