public function Stream::attach in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::attach()
Attach a new stream/resource to the instance.
Parameters
string|resource $resource:
string $mode:
Throws
InvalidArgumentException for stream identifier that cannot be cast to a resource
InvalidArgumentException for non-resource stream
File
- vendor/
zendframework/ zend-diactoros/ src/ Stream.php, line 90
Class
- Stream
- Implementation of PSR HTTP streams
Namespace
Zend\DiactorosCode
public function attach($resource, $mode = 'r') {
$this
->setStream($resource, $mode);
}