Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($options=[], TransportInterface $transport=null) | |
getOption ($key, $default=null) | |
setOption ($key, $value) | |
options ($url, array $headers=[], $timeout=null) | |
head ($url, array $headers=[], $timeout=null) | |
get ($url, array $headers=[], $timeout=null) | |
post ($url, $data, array $headers=[], $timeout=null) | |
put ($url, $data, array $headers=[], $timeout=null) | |
delete ($url, array $headers=[], $timeout=null, $data=null) | |
trace ($url, array $headers=[], $timeout=null) | |
patch ($url, $data, array $headers=[], $timeout=null) | |
sendRequest (RequestInterface $request) | |
Fonctions membres protégées | |
makeTransportRequest ($method, $url, $data=null, array $headers=[], $timeout=null) | |
Attributs protégés | |
$options | |
$transport | |
HTTP client class.
__construct | ( | $options = [] , |
|
TransportInterface | $transport = null |
||
) |
Constructor.
array | \ArrayAccess | $options | Client options array. If the registry contains any headers.* elements, these will be added to the request headers. |
TransportInterface | $transport | The HTTP transport object. |
Références Http\$options, Http\$transport, class, et Http\options().
Method to send the DELETE command to the server.
string | UriInterface | $url | The URI to the resource to request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
mixed | $data | Either an associative array or a string to be sent with the request. |
Références $url, et Http\makeTransportRequest().
get | ( | $url, | |
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the GET command to the server.
string | UriInterface | $url | The URI to the resource to request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $url, Http\makeTransportRequest(), et null.
getOption | ( | $key, | |
$default = null |
|||
) |
Get an option from the HTTP client.
string | $key | The name of the option to get. |
mixed | $default | The default value if the option is not set. |
Références $default, $key, et Http\options().
head | ( | $url, | |
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the HEAD command to the server.
string | UriInterface | $url | The URI to the resource to request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $url, Http\makeTransportRequest(), et null.
|
protected |
Send a request to the server and return a Response object with the response.
string | $method | The HTTP method for sending the request. |
string | UriInterface | $url | The URI to the resource to request. |
mixed | $data | Either an associative array or a string to be sent with the request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $data, $key, $method, $temp, $url, $val, class, elseif, null, et Http\options().
Référencé par Http\delete(), Http\get(), Http\head(), Http\options(), Http\patch(), Http\post(), Http\put(), Http\sendRequest(), et Http\trace().
options | ( | $url, | |
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the OPTIONS command to the server.
string | UriInterface | $url | The URI to the resource to request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $url, Http\makeTransportRequest(), et null.
Référencé par Http\__construct(), Http\getOption(), Http\makeTransportRequest(), et Http\setOption().
patch | ( | $url, | |
$data, | |||
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the PATCH command to the server.
string | UriInterface | $url | The URI to the resource to request. |
mixed | $data | Either an associative array or a string to be sent with the request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $url, et Http\makeTransportRequest().
post | ( | $url, | |
$data, | |||
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the POST command to the server.
string | UriInterface | $url | The URI to the resource to request. |
mixed | $data | Either an associative array or a string to be sent with the request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $data, $url, et Http\makeTransportRequest().
put | ( | $url, | |
$data, | |||
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the PUT command to the server.
string | UriInterface | $url | The URI to the resource to request. |
mixed | $data | Either an associative array or a string to be sent with the request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $data, $url, et Http\makeTransportRequest().
sendRequest | ( | RequestInterface | $request | ) |
Sends a PSR-7 request and returns a PSR-7 response.
RequestInterface | $request | The PSR-7 request object. |
Implémente ClientInterface.
Références $data, MessageInterface\getBody(), MessageInterface\getHeaders(), RequestInterface\getMethod(), RequestInterface\getUri(), Http\makeTransportRequest(), et null.
setOption | ( | $key, | |
$value | |||
) |
Set an option for the HTTP client.
string | $key | The name of the option to set. |
mixed | $value | The option value to set. |
Références $key, $this, $value, et Http\options().
trace | ( | $url, | |
array | $headers = [] , |
||
$timeout = null |
|||
) |
Method to send the TRACE command to the server.
string | UriInterface | $url | The URI to the resource to request. |
array | $headers | An array of request headers to send with the request. |
integer | $timeout | Read timeout in seconds. |
Références $url, Http\makeTransportRequest(), et null.
|
protected |
Référencé par Http\__construct().
|
protected |
Référencé par Http\__construct().