Open Journal Systems  3.3.0
GuzzleHttp Namespace Reference

Namespaces

 Cookie
 
 Exception
 
 Handler
 
 Promise
 
 Psr7
 

Data Structures

class  Client
 
interface  ClientInterface
 
class  HandlerStack
 
class  MessageFormatter
 
class  Middleware
 
class  Pool
 
class  PrepareBodyMiddleware
 
class  RedirectMiddleware
 
class  RequestOptions
 
class  RetryMiddleware
 
class  TransferStats
 
class  UriTemplate
 
class  Utils
 

Functions

 choose_handler ()
 
 debug_resource ($value=null)
 
 default_ca_bundle ()
 
 default_user_agent ()
 
 describe_type ($input)
 
 headers_from_lines ($lines)
 
 is_host_in_noproxy ($host, array $noProxyArray)
 
 json_decode ($json, $assoc=false, $depth=512, $options=0)
 
 json_encode ($value, $options=0, $depth=512)
 
 normalize_header_keys (array $headers)
 
 uri_template ($template, array $variables)
 

Function Documentation

◆ choose_handler()

GuzzleHttp\choose_handler ( )

Chooses and creates a default handler to use based on the environment.

The returned handler is not wrapped by any default middlewares.

Returns
callable Returns the best handler for the given system.
Exceptions

Definition at line 103 of file guzzlehttp/guzzle/src/functions.php.

References GuzzleHttp\Handler\Proxy\wrapStreaming(), and GuzzleHttp\Handler\Proxy\wrapSync().

Referenced by GuzzleHttp\HandlerStack\create().

◆ debug_resource()

GuzzleHttp\debug_resource (   $value = null)

Returns a debug stream based on the provided variable.

Parameters
mixed$valueOptional value
Returns
resource

Definition at line 84 of file guzzlehttp/guzzle/src/functions.php.

◆ default_ca_bundle()

GuzzleHttp\default_ca_bundle ( )

Returns the default cacert bundle for the current system.

First, the openssl.cafile and curl.cainfo php.ini settings are checked. If those settings are not configured, then the common locations for bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X and Windows are checked. If any of these file locations are found on disk, they will be utilized.

Note: the result of this function is cached for subsequent calls.

Returns
string
Exceptions

Definition at line 160 of file guzzlehttp/guzzle/src/functions.php.

References GuzzleHttp\Promise\any().

◆ default_user_agent()

GuzzleHttp\default_user_agent ( )

Get the default User-Agent string to use with Guzzle

Returns
string

Definition at line 131 of file guzzlehttp/guzzle/src/functions.php.

References GuzzleHttp\ClientInterface\VERSION.

◆ describe_type()

GuzzleHttp\describe_type (   $input)

Debug function used to describe the provided value type and class.

Parameters
mixed$input
Returns
string Returns a string containing the type of the variable and if a class is provided, the class name.

Definition at line 41 of file guzzlehttp/guzzle/src/functions.php.

Referenced by GuzzleHttp\Handler\MockHandler\append().

◆ headers_from_lines()

GuzzleHttp\headers_from_lines (   $lines)

Parses an array of header lines into an associative array of headers.

Parameters
iterable$linesHeader lines array of strings in the following format: "Name: Value"
Returns
array

Definition at line 63 of file guzzlehttp/guzzle/src/functions.php.

◆ is_host_in_noproxy()

GuzzleHttp\is_host_in_noproxy (   $host,
array  $noProxyArray 
)

Returns true if the provided host matches any of the no proxy areas.

This method will strip a port from the host if it is present. Each pattern can be matched with an exact match (e.g., "foo.com" == "foo.com") or a partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == "baz.foo.com", but ".foo.com" != "foo.com").

Areas are matched in the following cases:

  1. "*" (without quotes) always matches any hosts.
  2. An exact match.
  3. The area starts with "." and the area is the last part of the host. e.g. '.mit.edu' will match any host that ends with '.mit.edu'.
Parameters
string$hostHost to check against the patterns.
array$noProxyArrayAn array of host patterns.
Returns
bool

Definition at line 254 of file guzzlehttp/guzzle/src/functions.php.

◆ json_decode()

GuzzleHttp\json_decode (   $json,
  $assoc = false,
  $depth = 512,
  $options = 0 
)

Wrapper for json_decode that throws when an error occurs.

Parameters
string$jsonJSON data to parse
bool$assocWhen true, returned objects will be converted into associative arrays.
int$depthUser specified recursion depth.
int$optionsBitmask of JSON decode options.
Returns
mixed
Exceptions
Exception

Definition at line 301 of file guzzlehttp/guzzle/src/functions.php.

Referenced by GuzzleHttp\Cookie\SessionCookieJar\load(), and GuzzleHttp\Cookie\FileCookieJar\load().

◆ json_encode()

GuzzleHttp\json_encode (   $value,
  $options = 0,
  $depth = 512 
)

Wrapper for JSON encoding that throws when an error occurs.

Parameters
mixed$valueThe value being encoded
int$optionsJSON encode option bitmask
int$depthSet the maximum depth. Must be greater than zero.
Returns
string
Exceptions
Exception

Definition at line 324 of file guzzlehttp/guzzle/src/functions.php.

Referenced by GuzzleHttp\Promise\RejectionException\__construct(), and GuzzleHttp\Cookie\SessionCookieJar\save().

◆ normalize_header_keys()

GuzzleHttp\normalize_header_keys ( array  $headers)

Creates an associative array of lowercase header names to the actual header casing.

Parameters
array$headers
Returns
array

Definition at line 225 of file guzzlehttp/guzzle/src/functions.php.

◆ uri_template()

GuzzleHttp\uri_template (   $template,
array  $variables 
)

Expands a URI template

Parameters
string$templateURI template
array$variablesTemplate variables
Returns
string

Definition at line 17 of file guzzlehttp/guzzle/src/functions.php.