Documentation

File
in package

Description of File

Tags
author

zozlak

Table of Contents

Properties

$info  : SplFileInfo
$meta  : DatasetNodeInterface
$meterId  : string|null
$n  : int|null
$pidPass  : bool
$repo  : Repo
$repoRes  : RepoResource
$sizeLimit  : int
$skipMode  : int
$uploadsCount  : int
$versioning  : int

Methods

__construct()  : mixed
getPath()  : string
getUploadsCount()  : int
upload()  : RepoResource
Synchronous version of the `uploadAsync()`.
uploadAsync()  : PromiseInterface
Uploads the file into the repository.
assureLabel()  : void
Makes sure metadata will contain a label but if remote metadata label exists, it won't be overwritten.
createAsync()  : RepoResourcePromise
getBinaryData()  : BinaryPayload|null
Returns acdhOeaw\arche\lib\BinaryPayload object representing file contents.
getHash()  : string
getIds()  : array<string|int, string>
updateAsync()  : RepoResourcePromise|RepoResource
versioningAsync()  : RepoResourcePromise|RepoResource
withinSizeLimit()  : bool

Properties

$info

private SplFileInfo $info

$meta

private DatasetNodeInterface $meta

$meterId

private string|null $meterId

$n

private int|null $n = null

$pidPass

private bool $pidPass

$sizeLimit

private int $sizeLimit

$skipMode

private int $skipMode

$uploadsCount

private int $uploadsCount = 0

$versioning

private int $versioning

Methods

__construct()

public __construct(SplFileInfo $fileInfo, DatasetNodeInterface $meta, Repo $repo) : mixed
Parameters
$fileInfo : SplFileInfo
$meta : DatasetNodeInterface
$repo : Repo

getPath()

public getPath() : string
Return values
string

getUploadsCount()

public getUploadsCount() : int
Return values
int

upload()

Synchronous version of the `uploadAsync()`.

public upload([int $sizeLimit = -1 ][, int $skipMode = Indexer::SKIP_NONE ][, int $versioning = Indexer::VERSIONING_NONE ][, bool $pidPass = false ][, string|null $meterId = null ]) : RepoResource
Parameters
$sizeLimit : int = -1
$skipMode : int = Indexer::SKIP_NONE
$versioning : int = Indexer::VERSIONING_NONE
$pidPass : bool = false
$meterId : string|null = null
Return values
RepoResource

| SkippedException

uploadAsync()

Uploads the file into the repository.

public uploadAsync([int $sizeLimit = -1 ][, int $skipMode = Indexer::SKIP_NONE ][, int $versioning = Indexer::VERSIONING_NONE ][, bool $pidPass = false ][, string|null $meterId = null ]) : PromiseInterface
Parameters
$sizeLimit : int = -1
$skipMode : int = Indexer::SKIP_NONE

skip rules based on existence of corresponding repository resource. One of Indexer::SKIP_NONE, Indexer::SKIP_EXIST, Indexer::SKIP_BINARY_EXIST, Indexer::SKIP_NOT_EXIST

$versioning : int = Indexer::VERSIONING_NONE

versioning mode - one of Indexer::VERSIONING_NONE, Indexer::VERSIONING_DATE, Indexer::VERSIONING_DIGEST, Indexer::VERSIONING_ALWAYS

$pidPass : bool = false
$meterId : string|null = null

identifier of the progress meter (if null, no progress information is displayed)

Return values
PromiseInterface

assureLabel()

Makes sure metadata will contain a label but if remote metadata label exists, it won't be overwritten.

private assureLabel() : void

getBinaryData()

Returns acdhOeaw\arche\lib\BinaryPayload object representing file contents.

private getBinaryData([bool $skip = false ]) : BinaryPayload|null
Parameters
$skip : bool = false
Return values
BinaryPayload|null

getHash()

private getHash(string $hashName) : string
Parameters
$hashName : string
Return values
string

getIds()

private getIds() : array<string|int, string>
Return values
array<string|int, string>

withinSizeLimit()

private withinSizeLimit() : bool
Return values
bool

        
On this page

Search results