| Línea 48... |
Línea 48... |
| 48 |
/**
|
48 |
/**
|
| 49 |
* Chooses and creates a default handler to use based on the environment.
|
49 |
* Chooses and creates a default handler to use based on the environment.
|
| 50 |
*
|
50 |
*
|
| 51 |
* The returned handler is not wrapped by any default middlewares.
|
51 |
* The returned handler is not wrapped by any default middlewares.
|
| 52 |
*
|
52 |
*
|
| 53 |
* @throws \RuntimeException if no viable Handler is available.
|
- |
|
| 54 |
*
|
- |
|
| 55 |
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
|
53 |
* @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
|
| 56 |
*
|
54 |
*
|
| - |
|
55 |
* @throws \RuntimeException if no viable Handler is available.
|
| - |
|
56 |
*
|
| 57 |
* @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.
|
57 |
* @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.
|
| 58 |
*/
|
58 |
*/
|
| 59 |
function choose_handler(): callable
|
59 |
function choose_handler(): callable
|
| 60 |
{
|
60 |
{
|
| 61 |
return Utils::chooseHandler();
|
61 |
return Utils::chooseHandler();
|
| Línea 139... |
Línea 139... |
| 139 |
*
|
139 |
*
|
| 140 |
* @return object|array|string|int|float|bool|null
|
140 |
* @return object|array|string|int|float|bool|null
|
| 141 |
*
|
141 |
*
|
| 142 |
* @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
|
142 |
* @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
|
| 143 |
*
|
143 |
*
|
| 144 |
* @link https://www.php.net/manual/en/function.json-decode.php
|
144 |
* @see https://www.php.net/manual/en/function.json-decode.php
|
| 145 |
* @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.
|
145 |
* @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.
|
| 146 |
*/
|
146 |
*/
|
| 147 |
function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
|
147 |
function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
|
| 148 |
{
|
148 |
{
|
| 149 |
return Utils::jsonDecode($json, $assoc, $depth, $options);
|
149 |
return Utils::jsonDecode($json, $assoc, $depth, $options);
|
| Línea 156... |
Línea 156... |
| 156 |
* @param int $options JSON encode option bitmask
|
156 |
* @param int $options JSON encode option bitmask
|
| 157 |
* @param int $depth Set the maximum depth. Must be greater than zero.
|
157 |
* @param int $depth Set the maximum depth. Must be greater than zero.
|
| 158 |
*
|
158 |
*
|
| 159 |
* @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
|
159 |
* @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
|
| 160 |
*
|
160 |
*
|
| 161 |
* @link https://www.php.net/manual/en/function.json-encode.php
|
161 |
* @see https://www.php.net/manual/en/function.json-encode.php
|
| 162 |
* @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.
|
162 |
* @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.
|
| 163 |
*/
|
163 |
*/
|
| 164 |
function json_encode($value, int $options = 0, int $depth = 512): string
|
164 |
function json_encode($value, int $options = 0, int $depth = 512): string
|
| 165 |
{
|
165 |
{
|
| 166 |
return Utils::jsonEncode($value, $options, $depth);
|
166 |
return Utils::jsonEncode($value, $options, $depth);
|