GuzzleHttpPsr7copy_to_stream

Copy the contents of a stream into another stream until the given number of bytes have been read.

Description

GuzzleHttp\Psr7\copy_to_stream( (StreamInterface) Psr\Http\Message\StreamInterface $source, (StreamInterface) Psr\Http\Message\StreamInterface $dest, (int) $maxLen = -1 ); 

Parameters (3)

0. $source (StreamInterface) => Psr\Http\Message\StreamInterface $source
Stream to read from
1. $dest (StreamInterface) => Psr\Http\Message\StreamInterface $dest
Stream to write to
2. $maxlen (int)
Maximum number of bytes to read. Pass -1 to read the entire stream.

Usage

  1. if ( !function_exists( 'GuzzleHttp\Psr7\copy_to_stream' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Psr7/functions.php'; 
  3.  
  4. // Stream to read from 
  5. $source = Psr\Http\Message\StreamInterface $source; 
  6.  
  7. // Stream to write to 
  8. $dest = Psr\Http\Message\StreamInterface $dest; 
  9.  
  10. // Maximum number of bytes to read. Pass -1 
  11. // to read the entire stream. 
  12. $maxlen = -1; 
  13.  
  14. // NOTICE! Understand what this does before running. 
  15. $result = GuzzleHttp\Psr7\copy_to_stream($source, $dest, $maxlen); 
  16.  

Defined (1)

The function is defined in the following location(s).

/lib/Azure/GuzzleHttp/Psr7/functions.php