Open Journal Systems
3.3.0
|
Data Structures | |
class | AppendStream |
class | BufferStream |
class | CachingStream |
class | DroppingStream |
class | FnStream |
class | InflateStream |
class | LazyOpenStream |
class | LimitStream |
class | MultipartStream |
class | NoSeekStream |
class | PumpStream |
class | Request |
class | Response |
class | Rfc7230 |
class | ServerRequest |
class | Stream |
class | StreamWrapper |
class | UploadedFile |
class | Uri |
class | UriNormalizer |
class | UriResolver |
Functions | |
_caseless_remove ($keys, array $data) | |
_parse_message ($message) | |
_parse_request_uri ($path, array $headers) | |
build_query (array $params, $encoding=PHP_QUERY_RFC3986) | |
copy_to_stream (StreamInterface $source, StreamInterface $dest, $maxLen=-1) | |
copy_to_string (StreamInterface $stream, $maxLen=-1) | |
get_message_body_summary (MessageInterface $message, $truncateAt=120) | |
getBody () | |
getHeader ($header) | |
getHeaderLine ($header) | |
getHeaders () | |
getProtocolVersion () | |
hash (StreamInterface $stream, $algo, $rawOutput=false) | |
hasHeader ($header) | |
mimetype_from_extension ($extension) | |
mimetype_from_filename ($filename) | |
modify_request (RequestInterface $request, array $changes) | |
normalize_header ($header) | |
parse_header ($header) | |
parse_query ($str, $urlEncoding=true) | |
parse_request ($message) | |
parse_response ($message) | |
readline (StreamInterface $stream, $maxLength=null) | |
rewind_body (MessageInterface $message) | |
str (MessageInterface $message) | |
stream_for ($resource='', array $options=[]) | |
try_fopen ($filename, $mode) | |
uri_for ($uri) | |
withAddedHeader ($header, $value) | |
withBody (StreamInterface $body) | |
withHeader ($header, $value) | |
withoutHeader ($header) | |
withProtocolVersion ($version) | |
Variables | |
trait | MessageTrait |
GuzzleHttp\Psr7\_caseless_remove | ( | $keys, | |
array | $data | ||
) |
Definition at line 884 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\modify_request().
GuzzleHttp\Psr7\_parse_message | ( | $message | ) |
Parses an HTTP message into an associative array.
The array contains the "start-line" key containing the start line of the message, "headers" key containing an associative array of header array values, and a "body" key containing the body of the message.
string | $message | HTTP request or response to parse. |
Definition at line 762 of file guzzlehttp/psr7/src/functions.php.
References GuzzleHttp\Psr7\Rfc7230\HEADER_FOLD_REGEX, and GuzzleHttp\Psr7\Rfc7230\HEADER_REGEX.
Referenced by GuzzleHttp\Psr7\parse_request(), and GuzzleHttp\Psr7\parse_response().
GuzzleHttp\Psr7\_parse_request_uri | ( | $path, | |
array | $headers | ||
) |
Constructs a URI for an HTTP request message.
string | $path | Path from the start-line |
array | $headers | Array of headers (each value an array). |
Definition at line 826 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\parse_request().
GuzzleHttp\Psr7\build_query | ( | array | $params, |
$encoding = PHP_QUERY_RFC3986 |
|||
) |
Build a query string from an array of key value pairs.
This function can use the return value of parse_query() to build a query string. This function does not modify the provided keys when an array is encountered (like http_build_query would).
array | $params | Query string parameters. |
int | false | $encoding | Set to false to not encode, PHP_QUERY_RFC3986 to encode using RFC3986, or PHP_QUERY_RFC1738 to encode using RFC1738. |
Definition at line 578 of file guzzlehttp/psr7/src/functions.php.
GuzzleHttp\Psr7\copy_to_stream | ( | StreamInterface | $source, |
StreamInterface | $dest, | ||
$maxLen = -1 |
|||
) |
Copy the contents of a stream into another stream until the given number of bytes have been read.
StreamInterface | $source | Stream to read from |
StreamInterface | $dest | Stream to write to |
int | $maxLen | Maximum number of bytes to read. Pass -1 to read the entire stream. |
Definition at line 373 of file guzzlehttp/psr7/src/functions.php.
References Psr\Http\Message\StreamInterface\write().
Referenced by GuzzleHttp\Psr7\UploadedFile\moveTo().
GuzzleHttp\Psr7\copy_to_string | ( | StreamInterface | $stream, |
$maxLen = -1 |
|||
) |
Copy the contents of a stream into a string until the given number of bytes have been read.
StreamInterface | $stream | Stream to read |
int | $maxLen | Maximum number of bytes to read. Pass -1 to read the entire stream. |
Definition at line 332 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\PumpStream\__toString(), and GuzzleHttp\Psr7\AppendStream\getContents().
GuzzleHttp\Psr7\get_message_body_summary | ( | MessageInterface | $message, |
$truncateAt = 120 |
|||
) |
Get a short summary of the message body
Will return null
if the response is not printable.
MessageInterface | $message | The message to get the body summary |
int | $truncateAt | The maximum allowed size of the summary |
Definition at line 853 of file guzzlehttp/psr7/src/functions.php.
References Psr\Http\Message\MessageInterface\getBody().
GuzzleHttp\Psr7\getBody | ( | ) |
Definition at line 129 of file MessageTrait.php.
References GuzzleHttp\Psr7\stream_for().
GuzzleHttp\Psr7\getHeader | ( | $header | ) |
Definition at line 61 of file MessageTrait.php.
Referenced by GuzzleHttp\Psr7\getHeaderLine().
GuzzleHttp\Psr7\getHeaderLine | ( | $header | ) |
Definition at line 74 of file MessageTrait.php.
References GuzzleHttp\Psr7\getHeader().
GuzzleHttp\Psr7\getHeaders | ( | ) |
Definition at line 51 of file MessageTrait.php.
GuzzleHttp\Psr7\getProtocolVersion | ( | ) |
Definition at line 35 of file MessageTrait.php.
GuzzleHttp\Psr7\hash | ( | StreamInterface | $stream, |
$algo, | |||
$rawOutput = false |
|||
) |
Calculate a hash of a Stream
StreamInterface | $stream | Stream to calculate the hash for |
string | $algo | Hash algorithm (e.g. md5, crc32, etc) |
bool | $rawOutput | Whether or not to use raw output |
Definition at line 410 of file guzzlehttp/psr7/src/functions.php.
GuzzleHttp\Psr7\hasHeader | ( | $header | ) |
Definition at line 56 of file MessageTrait.php.
GuzzleHttp\Psr7\mimetype_from_extension | ( | $extension | ) |
Maps a file extensions to a mimetype.
$extension | string The file extension. |
Definition at line 637 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\mimetype_from_filename().
GuzzleHttp\Psr7\mimetype_from_filename | ( | $filename | ) |
Determines the mimetype of a file by looking at its extension.
$filename |
Definition at line 624 of file guzzlehttp/psr7/src/functions.php.
References GuzzleHttp\Psr7\mimetype_from_extension().
Referenced by GuzzleHttp\PrepareBodyMiddleware\__invoke().
GuzzleHttp\Psr7\modify_request | ( | RequestInterface | $request, |
array | $changes | ||
) |
Clone and modify a request with the given changes.
The changes can be one of:
RequestInterface | $request | Request to clone and modify. |
array | $changes | Changes to apply. |
Definition at line 201 of file guzzlehttp/psr7/src/functions.php.
References GuzzleHttp\Psr7\_caseless_remove(), Psr\Http\Message\MessageInterface\getBody(), Psr\Http\Message\MessageInterface\getHeaders(), Psr\Http\Message\RequestInterface\getMethod(), Psr\Http\Message\MessageInterface\getProtocolVersion(), and Psr\Http\Message\RequestInterface\getUri().
Referenced by GuzzleHttp\PrepareBodyMiddleware\__invoke().
GuzzleHttp\Psr7\normalize_header | ( | $header | ) |
Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values.
string | array | $header | Header to normalize. |
Definition at line 162 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\parse_header().
GuzzleHttp\Psr7\parse_header | ( | $header | ) |
Parse an array of header values containing ";" separated data into an array of associative arrays representing the header key value pair data of the header. When a parameter does not contain a value, but just contains a key, this function will inject a key with a '' string value.
string | array | $header | Header to parse into components. |
Definition at line 129 of file guzzlehttp/psr7/src/functions.php.
References GuzzleHttp\Psr7\normalize_header().
GuzzleHttp\Psr7\parse_query | ( | $str, | |
$urlEncoding = true |
|||
) |
Parse a query string into an associative array.
If multiple values are found for the same key, the value of that key value pair will become an array. This function does not parse nested PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
string | $str | Query string to parse |
int | bool | $urlEncoding | How the query string is encoded |
Definition at line 528 of file guzzlehttp/psr7/src/functions.php.
GuzzleHttp\Psr7\parse_request | ( | $message | ) |
Parses a request message string into a request object.
string | $message | Request message string. |
Definition at line 467 of file guzzlehttp/psr7/src/functions.php.
References GuzzleHttp\Psr7\_parse_message(), and GuzzleHttp\Psr7\_parse_request_uri().
GuzzleHttp\Psr7\parse_response | ( | $message | ) |
Parses a response message string into a response object.
string | $message | Response message string. |
Definition at line 495 of file guzzlehttp/psr7/src/functions.php.
References GuzzleHttp\Psr7\_parse_message().
GuzzleHttp\Psr7\readline | ( | StreamInterface | $stream, |
$maxLength = null |
|||
) |
Read a line from the stream up to the maximum allowed buffer length
StreamInterface | $stream | Stream to read from |
int | $maxLength | Maximum buffer length |
Definition at line 440 of file guzzlehttp/psr7/src/functions.php.
GuzzleHttp\Psr7\rewind_body | ( | MessageInterface | $message | ) |
Attempts to rewind a message body and throws an exception on failure.
The body of the message will only be rewound if a call to tell()
returns a value other than 0
.
MessageInterface | $message | Message to rewind |
Definition at line 278 of file guzzlehttp/psr7/src/functions.php.
References Psr\Http\Message\MessageInterface\getBody().
GuzzleHttp\Psr7\str | ( | MessageInterface | $message | ) |
Returns the string representation of an HTTP message.
MessageInterface | $message | Message to convert to a string. |
Definition at line 18 of file guzzlehttp/psr7/src/functions.php.
References Psr\Http\Message\MessageInterface\getBody(), Psr\Http\Message\MessageInterface\getHeaders(), Psr\Http\Message\MessageInterface\getProtocolVersion(), and Psr\Http\Message\MessageInterface\hasHeader().
GuzzleHttp\Psr7\stream_for | ( | $resource = '' , |
|
array | $options = [] |
||
) |
Create a new stream based on the input type.
Options is an associative array that can contain the following keys:
resource | string | null | int | float | bool | StreamInterface | callable | \Iterator | $resource | Entity body data |
array | $options | Additional options |
Definition at line 78 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\Request\__construct(), GuzzleHttp\Psr7\Response\__construct(), XMLParser\_getStream(), GuzzleHttp\Psr7\LazyOpenStream\createStream(), GuzzleHttp\Psr7\MultipartStream\createStream(), and GuzzleHttp\Psr7\getBody().
GuzzleHttp\Psr7\try_fopen | ( | $filename, | |
$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.
string | $filename | File to open |
string | $mode | Mode used to open the file |
Definition at line 299 of file guzzlehttp/psr7/src/functions.php.
Referenced by GuzzleHttp\Psr7\LazyOpenStream\createStream().
GuzzleHttp\Psr7\uri_for | ( | $uri | ) |
Returns a UriInterface for the given value.
This function accepts a string or {
UriInterface
, it is returned as-is.string | UriInterface | $uri |
Definition at line 54 of file guzzlehttp/psr7/src/functions.php.
GuzzleHttp\Psr7\withAddedHeader | ( | $header, | |
$value | |||
) |
Definition at line 95 of file MessageTrait.php.
GuzzleHttp\Psr7\withBody | ( | StreamInterface | $body | ) |
Definition at line 138 of file MessageTrait.php.
GuzzleHttp\Psr7\withHeader | ( | $header, | |
$value | |||
) |
Definition at line 79 of file MessageTrait.php.
GuzzleHttp\Psr7\withoutHeader | ( | $header | ) |
Definition at line 113 of file MessageTrait.php.
GuzzleHttp\Psr7\withProtocolVersion | ( | $version | ) |
Definition at line 40 of file MessageTrait.php.
trait GuzzleHttp::Psr7\MessageTrait |
Trait implementing functionality common to requests and responses.
Definition at line 10 of file MessageTrait.php.