Methods |
public static caselessRemove(array $keys, array $data) : array Remove the items given by the keys, case insensitively from the data.
|
public static copyToStream(Psr\Http\Message\StreamInterface $source, Psr\Http\Message\StreamInterface $dest, int $maxLen = -1) : void Copy the contents of a stream into another stream until the given number of bytes have been read.
|
public static copyToString(Psr\Http\Message\StreamInterface $stream, int $maxLen = -1) : string Copy the contents of a stream into a string until the given number of bytes have been read.
|
public static hash(Psr\Http\Message\StreamInterface $stream, string $algo, bool $rawOutput = false) : string Calculate a hash of a stream. This method reads the entire stream to calculate a rolling hash, based
on PHP's
|
public static modifyRequest(Psr\Http\Message\RequestInterface $request, array $changes) : Psr\Http\Message\RequestInterface Clone and modify a request with the given changes. This method is useful for reducing the number of clones needed to mutate a message. The changes can be one of:
|
public static readLine(Psr\Http\Message\StreamInterface $stream, ?int $maxLength = NULL) : string Read a line from the stream up to the maximum allowed buffer length.
|
public static redactUserInfo(Psr\Http\Message\UriInterface $uri) : Psr\Http\Message\UriInterface Redact the password in the user info part of a URI. |
public static streamFor( $resource = '', array $options = []) : Psr\Http\Message\StreamInterface Create a new stream based on the input type. Options is an associative array that can contain the following keys:
This method accepts the following
|
public static tryFopen(string $filename, string $mode) 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.
|
public static tryGetContents( $stream) : string Safely gets the contents of a given stream. When stream_get_contents fails, PHP normally raises a warning. This function adds an error handler that checks for errors and throws an exception instead.
|
public static uriFor( $uri) : Psr\Http\Message\UriInterface Returns a UriInterface for the given value. This function accepts a string or UriInterface and returns a UriInterface for the given value. If the value is already a UriInterface, it is returned as-is.
|
Methods |
public static caselessRemove(array $keys, array $data) : array Remove the items given by the keys, case insensitively from the data.
|
public static copyToStream(Psr\Http\Message\StreamInterface $source, Psr\Http\Message\StreamInterface $dest, int $maxLen = -1) : void Copy the contents of a stream into another stream until the given number of bytes have been read.
|
public static copyToString(Psr\Http\Message\StreamInterface $stream, int $maxLen = -1) : string Copy the contents of a stream into a string until the given number of bytes have been read.
|
public static hash(Psr\Http\Message\StreamInterface $stream, string $algo, bool $rawOutput = false) : string Calculate a hash of a stream. This method reads the entire stream to calculate a rolling hash, based
on PHP's
|
public static modifyRequest(Psr\Http\Message\RequestInterface $request, array $changes) : Psr\Http\Message\RequestInterface Clone and modify a request with the given changes. This method is useful for reducing the number of clones needed to mutate a message. The changes can be one of:
|
public static readLine(Psr\Http\Message\StreamInterface $stream, ?int $maxLength = NULL) : string Read a line from the stream up to the maximum allowed buffer length.
|
public static redactUserInfo(Psr\Http\Message\UriInterface $uri) : Psr\Http\Message\UriInterface Redact the password in the user info part of a URI. |
public static streamFor( $resource = '', array $options = []) : Psr\Http\Message\StreamInterface Create a new stream based on the input type. Options is an associative array that can contain the following keys:
This method accepts the following
|
public static tryFopen(string $filename, string $mode) 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.
|
public static tryGetContents( $stream) : string Safely gets the contents of a given stream. When stream_get_contents fails, PHP normally raises a warning. This function adds an error handler that checks for errors and throws an exception instead.
|
public static uriFor( $uri) : Psr\Http\Message\UriInterface Returns a UriInterface for the given value. This function accepts a string or UriInterface and returns a UriInterface for the given value. If the value is already a UriInterface, it is returned as-is.
|