Client
About 2 min
Client
- Full name:
\Hazaar\Xml\Rpc\Client
- Parent class:
\Hazaar\HTTP\Client
Properties
location
protected \Hazaar\HTTP\URL $location
method_pfx
protected string $method_pfx
Methods
__construct
public __construct(\Hazaar\HTTP\URL $url, string $method_pfx = ''): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$url | \Hazaar\HTTP\URL | |
$method_pfx | string |
__call
public __call(string $name, array $args): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$args | array |
call
public call(string $name, array $args): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string | |
$args | array |
Inherited methods
__construct
public __construct(?string $localCert = null, ?string $passphrase = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$localCert | ?string | |
$passphrase | ?string |
auth
public auth(string $username, string $password): void
Parameters:
Parameter | Type | Description |
---|---|---|
$username | string | |
$password | string |
authorisation
public authorisation(\Hazaar\Auth\Adapter $auth): void
Parameters:
Parameter | Type | Description |
---|---|---|
$auth | \Hazaar\Auth\Adapter |
setHeader
public setHeader(string $header, string $value): void
Parameters:
Parameter | Type | Description |
---|---|---|
$header | string | |
$value | string |
options
public options(string $url): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string |
get
public get(string|\Hazaar\HTTP\URL $url, int $redirectLimit = 10, int $offset = -1, ?int $maxlen = null): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string|\Hazaar\HTTP\URL | |
$redirectLimit | int | |
$offset | int | |
$maxlen | ?int |
head
public head(string|\Hazaar\HTTP\URL $url, int $redirectLimit = 10): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string|\Hazaar\HTTP\URL | |
$redirectLimit | int |
post
public post(string|\Hazaar\HTTP\URL $url, mixed $data = null, ?string $dataType = null, int $redirectLimit): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string|\Hazaar\HTTP\URL | |
$data | mixed | |
$dataType | ?string | |
$redirectLimit | int |
delete
public delete(string|\Hazaar\HTTP\URL $url): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string|\Hazaar\HTTP\URL |
trace
public trace(string|\Hazaar\HTTP\URL $url): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string|\Hazaar\HTTP\URL |
send
Send a request to the desination host.
public send(\Hazaar\HTTP\Request $request, int $redirectLimit = 10): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \Hazaar\HTTP\Request | The request to send |
$redirectLimit | int | The number of allowed redirects. To disable automated redirects on this request, set to FALSE. |
getLastError
public getLastError(): string
getCookies
public getCookies(): array
getCookie
public getCookie(string $name): null|string[]|string
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
hasCookie
public hasCookie(string $name): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
deleteCookie
public deleteCookie(string $name): void
Parameters:
Parameter | Type | Description |
---|---|---|
$name | string |
setCookie
public setCookie(string[]|string $cookie): array
Parameters:
Parameter | Type | Description |
---|---|---|
$cookie | string[]|string |
cacheCookie
public cacheCookie(\Hazaar\Cache $cache, bool $cacheAll = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$cache | \Hazaar\Cache | |
$cacheAll | bool |
uncacheCookie
public uncacheCookie(\Hazaar\Cache $cache): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$cache | \Hazaar\Cache |
deleteCookies
public deleteCookies(): void
disableRedirect
public disableRedirect(): void
enableEncryption
public enableEncryption(?string $key = null, ?string $cipher = null): void
Parameters:
Parameter | Type | Description |
---|---|---|
$key | ?string | |
$cipher | ?string |
applyCookies
private applyCookies(\Hazaar\HTTP\Request $request): \Hazaar\HTTP\Request
Parameters:
Parameter | Type | Description |
---|---|---|
$request | \Hazaar\HTTP\Request |
Automatically generated on 2024-11-14