WebDAV
About 3 min
WebDAV
- Full name:
\Hazaar\HTTP\WebDAV
- Parent class:
\Hazaar\HTTP\Client
Properties
authorised
private bool $authorised
settings
private \Hazaar\Map $settings
classes
private array<int,string> $classes
allow
private string[] $allow
Methods
__construct
public __construct(array $settings): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$settings | array |
isAuthorised
public isAuthorised(): bool
getAbsoluteUrl
public getAbsoluteUrl(string $url): string
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string |
path
public path(string $url): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string |
propfind
Get the contents of a file.
public propfind(string $url, array $properties = [], int $depth = 1, bool $return_response = false, string[] $namespaces = []): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string | the URL of the file to get the contents of |
$properties | array | An array of properties to request. If empty, all properties will be requested. |
$depth | int | the depth of the PROPFIND request |
$return_response | bool | if true, the raw response object will be returned instead of the file contents |
$namespaces | string[] | an array of namespaces to use in the PROPFIND request |
proppatch
public proppatch(string $url, array $properties): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string | |
$properties | array | An array of properties to request. If empty, all properties will be requested. |
mkcol
Create a collection object (ie: a directory/folder).
public mkcol(string $url): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string |
put
Create a new object (ie: a file);.
public put(string $url, ?string $content = null, ?string $datatype = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string | |
$content | ?string | |
$datatype | ?string |
putFile
public putFile(string $dir_url, \Hazaar\File $file): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$dir_url | string | |
$file | \Hazaar\File |
delete
public delete(string|\Hazaar\HTTP\URL $url): false|\Hazaar\HTTP\Response
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string|\Hazaar\HTTP\URL |
xml
public xml(\Hazaar\XML\Element $xml): void
Parameters:
Parameter | Type | Description |
---|---|---|
$xml | \Hazaar\XML\Element |
parseProperties
protected parseProperties(\Hazaar\XML\Element $dom): array
Parameters:
Parameter | Type | Description |
---|---|---|
$dom | \Hazaar\XML\Element |
parseMultiStatus
protected parseMultiStatus(\Hazaar\XML\Element|string $xml): array
Parameters:
Parameter | Type | Description |
---|---|---|
$xml | \Hazaar\XML\Element|string |
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