Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct ($baseUrl='', $config=null) | |
createRequest ($method='GET', $uri=null, $headers=null, $body=null, array $options=array()) | |
delete ($uri=null, $headers=null, $body=null, array $options=array()) | |
get ($uri=null, $headers=null, $options=array()) | |
getBaseUrl ($expand=true) | |
getConfig ($key=false) | |
getCurlMulti () | |
getDefaultHeaders () | |
getDefaultOption ($keyOrPath) | |
getDefaultUserAgent () | |
head ($uri=null, $headers=null, array $options=array()) | |
options ($uri=null, array $options=array()) | |
patch ($uri=null, $headers=null, $body=null, array $options=array()) | |
post ($uri=null, $headers=null, $postBody=null, array $options=array()) | |
preparePharCacert ($md5Check=true) | |
put ($uri=null, $headers=null, $body=null, array $options=array()) | |
send ($requests) | |
setBaseUrl ($url) | |
setConfig ($config) | |
setCurlMulti (CurlMultiInterface $curlMulti) | |
setDefaultHeaders ($headers) | |
setDefaultOption ($keyOrPath, $value) | |
setRequestFactory (RequestFactoryInterface $factory) | |
setSslVerification ($certificateAuthority=true, $verifyPeer=true, $verifyHost=2) | |
setUriTemplate (UriTemplateInterface $uriTemplate) | |
setUserAgent ($userAgent, $includeDefault=false) | |
![]() | |
addSubscriber (EventSubscriberInterface $subscriber) | |
dispatch ($eventName, array $context=array()) | |
getEventDispatcher () | |
setEventDispatcher (EventDispatcherInterface $eventDispatcher) | |
Static Public Member Functions | |
static | extractPharCacert ($pharCacertPath) |
static | getAllEvents () |
Data Fields | |
const | CURL_OPTIONS = 'curl.options' |
const | DEFAULT_SELECT_TIMEOUT = 1.0 |
const | DISABLE_REDIRECTS = RedirectPlugin::DISABLE |
const | MAX_HANDLES = 3 |
const | REQUEST_OPTIONS = 'request.options' |
const | REQUEST_PARAMS = 'request.params' |
const | SSL_CERT_AUTHORITY = 'ssl.certificate_authority' |
![]() | |
const | CREATE_REQUEST = 'client.create_request' |
const | HTTP_DATE = 'D, d M Y H:i:s \G\M\T' |
Protected Member Functions | |
expandTemplate ($template, array $variables=null) | |
getUriTemplate () | |
initSsl () | |
prepareRequest (RequestInterface $request, array $options=array()) | |
sendMultiple (array $requests) | |
Protected Attributes | |
$defaultHeaders | |
$requestFactory | |
$userAgent | |
![]() | |
$eventDispatcher | |
HTTP client
Definition at line 24 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Guzzle\Http\Client::__construct | ( | $baseUrl = '' , |
|
$config = null |
|||
) |
string | $baseUrl | Base URL of the web service |
array | Collection | $config | Configuration settings |
RuntimeException | if cURL is not installed |
Definition at line 89 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Common\AbstractHasDispatcher\addSubscriber(), Guzzle\Http\Client\getDefaultUserAgent(), Guzzle\Http\Message\RequestFactory\getInstance(), Guzzle\Http\Client\initSsl(), Guzzle\Http\Client\setBaseUrl(), Guzzle\Http\Client\setConfig(), and Guzzle\Http\Client\setRequestFactory().
Guzzle\Http\Client::createRequest | ( | $method = 'GET' , |
|
$uri = null , |
|||
$headers = null , |
|||
$body = null , |
|||
array | $options = array() |
||
) |
Create and return a new {
Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URI can contain the query string as well. Use an array to provide a URI template and additional variables to use in the URI template expansion.
string | $method | HTTP method. Defaults to GET |
string | array | $uri | Resource URI. |
array | Collection | $headers | HTTP headers |
string | resource | array | EntityBodyInterface | $body | Entity body of request (POST/PUT) or response (GET) |
array | $options | Array of options to apply to the request |
InvalidArgumentException | if a URI array is passed that does not contain exactly two elements: the URI followed by template variables |
Implements Guzzle\Http\ClientInterface.
Definition at line 193 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\expandTemplate(), Guzzle\Http\Url\factory(), Guzzle\Http\Client\getBaseUrl(), and Guzzle\Http\Client\prepareRequest().
Referenced by Guzzle\Http\Client\delete(), Guzzle\Http\Client\get(), Guzzle\Http\Client\head(), Guzzle\Http\Client\options(), Guzzle\Http\Client\patch(), Guzzle\Http\Client\post(), and Guzzle\Http\Client\put().
Guzzle\Http\Client::delete | ( | $uri = null , |
|
$headers = null , |
|||
$body = null , |
|||
array | $options = array() |
||
) |
Create a DELETE request for the client
string | array | $uri | Resource URI |
array | Collection | $headers | HTTP headers |
string | resource | EntityBodyInterface | $body | Body to send in the request |
array | $options | Options to apply to the request |
Implements Guzzle\Http\ClientInterface.
Definition at line 272 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
|
protected |
Expand a URI template while merging client config settings into the template variables
string | $template | Template to expand |
array | $variables | Variables to inject |
Definition at line 370 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\getConfig(), and Guzzle\Http\Client\getUriTemplate().
Referenced by Guzzle\Http\Client\createRequest(), and Guzzle\Http\Client\getBaseUrl().
|
static |
Copies the phar cacert from a phar into the temp directory.
string | $pharCacertPath | Path to the phar cacert. For example: 'phar://aws.phar/Guzzle/Http/Resources/cacert.pem' |
Definition at line 522 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\initSsl().
Guzzle\Http\Client::get | ( | $uri = null , |
|
$headers = null , |
|||
$options = array() |
|||
) |
Create a GET request for the client
string | array | $uri | Resource URI |
array | Collection | $headers | HTTP headers |
array | $options | Options to apply to the request. For BC compatibility, you can also pass a string to tell Guzzle to download the body of the response to a particular location. Use the 'body' option instead for forward compatibility. |
Implements Guzzle\Http\ClientInterface.
Definition at line 259 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
|
static |
Get a list of all of the events emitted from the class
Reimplemented from Guzzle\Common\AbstractHasDispatcher.
Reimplemented in Guzzle\Service\Client.
Definition at line 78 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Tests\Http\ClientTest\testDescribesEvents().
Guzzle\Http\Client::getBaseUrl | ( | $expand = true | ) |
Get the client's base URL as either an expanded or raw URI template
bool | $expand | Set to FALSE to get the raw base URL without URI template expansion |
Implements Guzzle\Http\ClientInterface.
Definition at line 225 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\expandTemplate().
Referenced by Guzzle\Http\Client\createRequest().
|
final |
Get a configuration setting or all of the configuration settings. The Collection result of this method can be modified to change the configuration settings of a client.
A client should honor the following special values:
bool | string | $key | Configuration value to retrieve. Set to FALSE to retrieve all values of the client. The object return can be modified, and modifications will affect the client's config. |
Implements Guzzle\Http\ClientInterface.
Definition at line 120 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\expandTemplate(), Guzzle\Service\Client\getCommand(), and Guzzle\Http\Client\getCurlMulti().
Guzzle\Http\Client::getCurlMulti | ( | ) |
Definition at line 329 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\getConfig().
Referenced by Guzzle\Http\Client\send(), and Guzzle\Http\Client\sendMultiple().
Guzzle\Http\Client::getDefaultHeaders | ( | ) |
Definition at line 481 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\$defaultHeaders, and Guzzle\Common\Version\warn().
Guzzle\Http\Client::getDefaultOption | ( | $keyOrPath | ) |
Retrieve a default request option from the client
string | $keyOrPath | request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) |
Definition at line 148 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Guzzle\Http\Client::getDefaultUserAgent | ( | ) |
Get the default User-Agent string to use with Guzzle
Definition at line 252 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Curl\CurlVersion\getInstance(), and Guzzle\Common\Version\VERSION.
Referenced by Guzzle\Http\Client\__construct(), and Guzzle\Http\Client\setUserAgent().
|
protected |
Get the URI template expander used by the client
Definition at line 385 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Parser\ParserRegistry\getInstance().
Referenced by Guzzle\Http\Client\expandTemplate().
Guzzle\Http\Client::head | ( | $uri = null , |
|
$headers = null , |
|||
array | $options = array() |
||
) |
Create a HEAD request for the client
string | array | $uri | Resource URI |
array | Collection | $headers | HTTP headers |
array | $options | Options to apply to the request |
Implements Guzzle\Http\ClientInterface.
Definition at line 267 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
|
protected |
Initializes SSL settings
Definition at line 459 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\extractPharCacert(), Guzzle\Http\Client\setSslVerification(), and Guzzle\Http\Client\SSL_CERT_AUTHORITY.
Referenced by Guzzle\Http\Client\__construct().
Guzzle\Http\Client::options | ( | $uri = null , |
|
array | $options = array() |
||
) |
Create an OPTIONS request for the client
string | array | $uri | Resource URI |
array | $options | Options to apply to the request |
Implements Guzzle\Http\ClientInterface.
Definition at line 292 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
Guzzle\Http\Client::patch | ( | $uri = null , |
|
$headers = null , |
|||
$body = null , |
|||
array | $options = array() |
||
) |
Create a PATCH request for the client
string | array | $uri | Resource URI |
array | Collection | $headers | HTTP headers |
string | resource | EntityBodyInterface | $body | Body to send in the request |
array | $options | Options to apply to the request |
Implements Guzzle\Http\ClientInterface.
Definition at line 282 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
Guzzle\Http\Client::post | ( | $uri = null , |
|
$headers = null , |
|||
$postBody = null , |
|||
array | $options = array() |
||
) |
Create a POST request for the client
string | array | $uri | Resource URI |
array | Collection | $headers | HTTP headers |
array | Collection | string | EntityBodyInterface | $postBody | POST body. Can be a string, EntityBody, or associative array of POST fields to send in the body of the request. Prefix a value in the array with the @ symbol to reference a file. |
array | $options | Options to apply to the request |
Implements Guzzle\Http\ClientInterface.
Definition at line 287 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
Guzzle\Http\Client::preparePharCacert | ( | $md5Check = true | ) |
Definition at line 507 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
|
protected |
Prepare a request to be sent from the Client by adding client specific behaviors and properties to the request.
RequestInterface | $request | Request to prepare for the client |
array | $options | Options to apply to the request |
Definition at line 426 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Common\AbstractHasDispatcher\dispatch(), Guzzle\Http\Message\RequestInterface\getCurlOptions(), Guzzle\Common\AbstractHasDispatcher\getEventDispatcher(), Guzzle\Http\Message\MessageInterface\getParams(), Guzzle\Http\Message\MessageInterface\hasHeader(), Guzzle\Http\Message\RequestFactoryInterface\OPTIONS_AS_DEFAULTS, Guzzle\Http\Curl\CurlHandle\parseCurlConfig(), Guzzle\Http\Message\RequestInterface\setClient(), Guzzle\Http\Message\MessageInterface\setHeader(), and Guzzle\Common\Version\warn().
Referenced by Guzzle\Http\Client\createRequest().
Guzzle\Http\Client::put | ( | $uri = null , |
|
$headers = null , |
|||
$body = null , |
|||
array | $options = array() |
||
) |
Create a PUT request for the client
string | array | $uri | Resource URI |
array | Collection | $headers | HTTP headers |
string | resource | EntityBodyInterface | $body | Body to send in the request |
array | $options | Options to apply to the request |
Implements Guzzle\Http\ClientInterface.
Definition at line 277 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\createRequest().
Guzzle\Http\Client::send | ( | $requests | ) |
Sends a single request or an array of requests in parallel
array | RequestInterface | $requests | One or more RequestInterface objects to send |
Implements Guzzle\Http\ClientInterface.
Definition at line 297 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\getCurlMulti(), Guzzle\Common\Exception\ExceptionCollection\getFirst(), and Guzzle\Http\Client\sendMultiple().
Referenced by Guzzle\Service\Client\execute(), and Guzzle\Service\Client\executeMultiple().
|
protected |
Send multiple requests in parallel
array | $requests | Array of RequestInterface objects |
Definition at line 401 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\getCurlMulti().
Referenced by Guzzle\Http\Client\send().
Guzzle\Http\Client::setBaseUrl | ( | $url | ) |
Set the base URL of the client
string | $url | The base service endpoint URL of the webservice |
Implements Guzzle\Http\ClientInterface.
Definition at line 230 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\__construct(), and Guzzle\Service\Client\setDescription().
|
final |
Set the configuration object to use with the client
array | Collection | $config | Parameters that define how the client behaves |
Implements Guzzle\Http\ClientInterface.
Definition at line 107 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\__construct().
Guzzle\Http\Client::setCurlMulti | ( | CurlMultiInterface | $curlMulti | ) |
Set a curl multi object to be used internally by the client for transferring requests.
CurlMultiInterface | $curlMulti | Multi object |
Definition at line 319 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Guzzle\Http\Client::setDefaultHeaders | ( | $headers | ) |
Definition at line 490 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Common\Version\warn().
Guzzle\Http\Client::setDefaultOption | ( | $keyOrPath, | |
$value | |||
) |
Set a default request option on the client that will be used as a default for each request
string | $keyOrPath | request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) |
mixed | $value | Value to set |
Definition at line 133 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Guzzle\Http\Client::setRequestFactory | ( | RequestFactoryInterface | $factory | ) |
Definition at line 341 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\__construct().
|
final |
Set SSL verification options.
Setting $certificateAuthority to TRUE will result in the bundled cacert.pem being used to verify against the remote host.
Alternate certificates to verify against can be specified with the $certificateAuthority option set to the full path to a certificate file, or the path to a directory containing certificates.
Setting $certificateAuthority to FALSE will turn off peer verification, unset the bundled cacert.pem, and disable host verification. Please don't do this unless you really know what you're doing, and why you're doing it.
string | bool | $certificateAuthority | bool, file path, or directory path |
bool | $verifyPeer | FALSE to stop from verifying the peer's certificate. |
int | $verifyHost | Set to 1 to check the existence of a common name in the SSL peer certificate. 2 to check the existence of a common name and also verify that it matches the hostname provided. |
Implements Guzzle\Http\ClientInterface.
Definition at line 155 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\CURL_OPTIONS.
Referenced by Guzzle\Http\Client\initSsl().
Guzzle\Http\Client::setUriTemplate | ( | UriTemplateInterface | $uriTemplate | ) |
Set the URI template expander to use with the client
UriTemplateInterface | $uriTemplate | URI template expander |
Definition at line 355 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Guzzle\Http\Client::setUserAgent | ( | $userAgent, | |
$includeDefault = false |
|||
) |
Set the User-Agent header to be used on all requests from the client
string | $userAgent | User agent string |
bool | $includeDefault | Set to true to prepend the value to Guzzle's default user agent string |
Implements Guzzle\Http\ClientInterface.
Definition at line 237 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
References Guzzle\Http\Client\$userAgent, and Guzzle\Http\Client\getDefaultUserAgent().
|
protected |
Default HTTP headers to set on each request
Definition at line 40 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\getDefaultHeaders().
|
protected |
Request factory used by the client
Definition at line 76 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
|
protected |
The user agent string to set on each request
Definition at line 46 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\setUserAgent().
const Guzzle\Http\Client::CURL_OPTIONS = 'curl.options' |
Definition at line 30 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Service\Command\AbstractCommand\prepare(), and Guzzle\Http\Client\setSslVerification().
const Guzzle\Http\Client::DEFAULT_SELECT_TIMEOUT = 1.0 |
Definition at line 33 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
const Guzzle\Http\Client::DISABLE_REDIRECTS = RedirectPlugin::DISABLE |
Definition at line 32 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
const Guzzle\Http\Client::MAX_HANDLES = 3 |
Definition at line 34 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
const Guzzle\Http\Client::REQUEST_OPTIONS = 'request.options' |
Definition at line 29 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
const Guzzle\Http\Client::REQUEST_PARAMS = 'request.params' |
Definition at line 27 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
const Guzzle\Http\Client::SSL_CERT_AUTHORITY = 'ssl.certificate_authority' |
Definition at line 31 of file lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php.
Referenced by Guzzle\Http\Client\initSsl().