public function StreamDecoratorTrait::__get in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php \GuzzleHttp\Psr7\StreamDecoratorTrait::__get()
Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).
Parameters
string $name Name of the property (allows "stream" only).:
Return value
File
- vendor/
guzzlehttp/ psr7/ src/ StreamDecoratorTrait.php, line 28
Class
- StreamDecoratorTrait
- Stream decorator trait @property StreamInterface stream
Namespace
GuzzleHttp\Psr7Code
public function __get($name) {
if ($name == 'stream') {
$this->stream = $this
->createStream();
return $this->stream;
}
throw new \UnexpectedValueException("{$name} not found on class");
}