[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/guzzlehttp/streams/src/ -> Utils.php (summary)

(no description)

File Size: 196 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Utils:: (6 methods):
  open()
  copyToString()
  copyToStream()
  hash()
  readline()
  create()


Class: Utils  - X-Ref

Static utility class because PHP's autoloaders don't support the concept
of namespaced function autoloading.

open($filename, $mode)   X-Ref
Safely opens a PHP stream resource using a filename.

When fopen fails, PHP normally raises a warning. This function adds an
error handler that checks for errors and throws an exception instead.

param: string $filename File to open
param: string $mode     Mode used to open the file
return: resource

copyToString(StreamInterface $stream, $maxLen = -1)   X-Ref
Copy the contents of a stream into a string until the given number of
bytes have been read.

param: StreamInterface $stream Stream to read
param: int             $maxLen Maximum number of bytes to read. Pass -1
return: string

copyToStream(StreamInterface $source,StreamInterface $dest,$maxLen = -1)   X-Ref
Copy the contents of a stream into another stream until the given number
of bytes have been read.

param: StreamInterface $source Stream to read from
param: StreamInterface $dest   Stream to write to
param: int             $maxLen Maximum number of bytes to read. Pass -1

hash(StreamInterface $stream,$algo,$rawOutput = false)   X-Ref
Calculate a hash of a Stream

param: StreamInterface $stream    Stream to calculate the hash for
param: string          $algo      Hash algorithm (e.g. md5, crc32, etc)
param: bool            $rawOutput Whether or not to use raw output
return: string Returns the hash of the stream

readline(StreamInterface $stream, $maxLength = null)   X-Ref
Read a line from the stream up to the maximum allowed buffer length

param: StreamInterface $stream    Stream to read from
param: int             $maxLength Maximum buffer length
return: string|bool

create($resource, array $options = [])   X-Ref
Alias of GuzzleHttp\Stream\Stream::factory.

param: mixed $resource Resource to create
param: array $options  Associative array of stream options defined in
return: StreamInterface



Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1