private function StreamHandler::createSink in Lockr 7.3
1 call to StreamHandler::createSink()
- StreamHandler::createResponse in vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php
File
- vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php, line 141
Class
- StreamHandler
- HTTP handler that uses PHP's HTTP stream wrapper.
Namespace
GuzzleHttp\HandlerCode
private function createSink(StreamInterface $stream, array $options) {
if (!empty($options['stream'])) {
return $stream;
}
$sink = isset($options['sink']) ? $options['sink'] : fopen('php://temp', 'r+');
return is_string($sink) ? new Psr7\LazyOpenStream($sink, 'w+') : Psr7\stream_for($sink);
}