BrowserConnector
About 2 min
BrowserConnector
- Full name:
\Hazaar\File\BrowserConnector
Properties
sources
private \Hazaar\File\Manager[] $sources
url
private string $url
allowPreview
private string[] $allowPreview
progressCallBack
private ?\Closure $progressCallBack
Methods
__construct
public __construct(?string $url = null, string[] $allowPreview = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$url | ?string | |
$allowPreview | string[] | List of mime types that are allowed to be previewed |
setProgressCallback
public setProgressCallback(callable|\Closure $callback): void
Parameters:
Parameter | Type | Description |
---|---|---|
$callback | callable|\Closure |
addSource
public addSource(string $id, \Hazaar\File\Manager|string $source, ?string $name = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$id | string | |
$source | \Hazaar\File\Manager|string | |
$name | ?string |
authorised
public authorised(): bool|string
authorise
public authorise(string $sourceName, ?string $redirect_uri = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$sourceName | string | |
$redirect_uri | ?string |
source
public source(string $target): false|\Hazaar\File\Manager
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string |
path
public path(string $target): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string |
info
public info(\Hazaar\File\Manager $source, \Hazaar\File\Dir|\Hazaar\File $file): array<string,mixed>
Parameters:
Parameter | Type | Description |
---|---|---|
$source | \Hazaar\File\Manager | |
$file | \Hazaar\File\Dir|\Hazaar\File |
tree
public tree(?string $target = null, ?int $depth = null): array|false
Parameters:
Parameter | Type | Description |
---|---|---|
$target | ?string | |
$depth | ?int |
open
public open(string $target, bool $tree = false, int $depth = 1, ?string $filter = null, bool $with_meta = false): array|false
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string | |
$tree | bool | |
$depth | int | |
$filter | ?string | |
$with_meta | bool |
get
public get(string $target): \Hazaar\Controller\Response\File
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string |
getFile
public getFile(string $source, string $path = '/'): false|\Hazaar\File
Parameters:
Parameter | Type | Description |
---|---|---|
$source | string | |
$path | string |
getFileByPath
public getFileByPath(string $path): false|\Hazaar\File
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
mkdir
public mkdir(string $parent, string $name): array
Parameters:
Parameter | Type | Description |
---|---|---|
$parent | string | |
$name | string |
rmdir
public rmdir(string $target, bool $recurse = false): array
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string | |
$recurse | bool |
unlink
public unlink(string[]|string $target): array
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string[]|string |
copy
public copy(string $from, string $to): array
Parameters:
Parameter | Type | Description |
---|---|---|
$from | string | |
$to | string |
move
public move(string $from, string $to): array|false
Parameters:
Parameter | Type | Description |
---|---|---|
$from | string | |
$to | string |
rename
public rename(string $target, string $name, bool $with_meta = false): array
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string | |
$name | string | |
$with_meta | bool |
upload
public upload(string $parent, string[] $file, ?string $relativePath = null): array
Parameters:
Parameter | Type | Description |
---|---|---|
$parent | string | |
$file | string[] | |
$relativePath | ?string |
getMeta
public getMeta(string $target, ?string $key = null): array
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string | |
$key | ?string |
setMeta
public setMeta(string $target, array $values): array
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string | |
$values | array |
snatch
public snatch(string $url, string $target): array
Parameters:
Parameter | Type | Description |
---|---|---|
$url | string | |
$target | string |
search
public search(string $target, string $query): array
Parameters:
Parameter | Type | Description |
---|---|---|
$target | string | |
$query | string |
target
private target(\Hazaar\File\Manager|string $source, ?string $path = null): string
Parameters:
Parameter | Type | Description |
---|---|---|
$source | \Hazaar\File\Manager|string | |
$path | ?string |
Automatically generated on 2024-11-14