Nextcloud PHP API (master)

Task
in package
implements JsonSerializable

FinalYes

This is a task processing task

Tags
since
30.0.0

Table of Contents

Interfaces

JsonSerializable

Constants

STATUS_CANCELLED  = 5
STATUS_FAILED  = 4
STATUS_RUNNING  = 2
STATUS_SCHEDULED  = 1
STATUS_SUCCESSFUL  = 3
STATUS_UNKNOWN  = 0

Properties

$appId  : string
$completionExpectedAt  : DateTime|null
$customId  : string|null
$endedAt  : int|null
$errorMessage  : string|null
$id  : int|null
$input  : array<string|int, mixed>
$lastUpdated  : int
$output  : array<string|int, mixed>|null
$progress  : float|null
$scheduledAt  : int|null
$startedAt  : int|null
$status  : int
$taskTypeId  : string
$userId  : string|null
$webhookMethod  : string|null
$webhookUri  : string|null

Methods

__construct()  : mixed
getAppId()  : string
getCompletionExpectedAt()  : DateTime|null
getCustomId()  : null|string
getEndedAt()  : int|null
getErrorMessage()  : string|null
getId()  : int|null
getInput()  : array<string|int, array<int, (numeric)|string>|(numeric)|string>
getLastUpdated()  : int
getOutput()  : array<string|int, array<int, (numeric)|string>|(numeric)|string>|null
getProgress()  : float|null
getScheduledAt()  : int|null
getStartedAt()  : int|null
getStatus()  : int
getTaskTypeId()  : string
getUserId()  : string|null
getWebhookMethod()  : null|string
getWebhookUri()  : null|string
jsonSerialize()  : array<string|int, mixed>
setCompletionExpectedAt()  : void
setEndedAt()  : void
setErrorMessage()  : void
setId()  : void
setInput()  : void
setLastUpdated()  : void
setOutput()  : void
setProgress()  : void
setScheduledAt()  : void
setStartedAt()  : void
setStatus()  : void
setWebhookMethod()  : void
setWebhookUri()  : void
statusToString()  : "STATUS_CANCELLED"|"STATUS_FAILED"|"STATUS_SUCCESSFUL"|"STATUS_RUNNING"|"STATUS_SCHEDULED"|"STATUS_UNKNOWN"

Constants

STATUS_CANCELLED

public mixed STATUS_CANCELLED = 5
Tags
since
30.0.0

STATUS_FAILED

public mixed STATUS_FAILED = 4
Tags
since
30.0.0

STATUS_RUNNING

public mixed STATUS_RUNNING = 2
Tags
since
30.0.0

STATUS_SCHEDULED

public mixed STATUS_SCHEDULED = 1
Tags
since
30.0.0

STATUS_SUCCESSFUL

public mixed STATUS_SUCCESSFUL = 3
Tags
since
30.0.0

STATUS_UNKNOWN

public mixed STATUS_UNKNOWN = 0
Tags
since
30.0.0

Properties

$appId read-only

protected string $appId

$completionExpectedAt

protected DateTime|null $completionExpectedAt = null

$customId read-only

protected string|null $customId = ''

$endedAt

protected int|null $endedAt = null

$errorMessage

protected string|null $errorMessage = null

$id

protected int|null $id = null

$input

protected array<string|int, mixed> $input

$lastUpdated

protected int $lastUpdated

$output

protected array<string|int, mixed>|null $output = null

$progress

protected float|null $progress = null

$scheduledAt

protected int|null $scheduledAt = null

$startedAt

protected int|null $startedAt = null

$status

protected int $status = self::STATUS_UNKNOWN
Tags
psalm-var

self::STATUS_*

$taskTypeId read-only

protected string $taskTypeId

$userId read-only

protected string|null $userId

$webhookMethod

protected string|null $webhookMethod = null

$webhookUri

protected string|null $webhookUri = null

Methods

__construct()

public final __construct(string $taskTypeId, array<string, array<int, (numeric)|string>|(numeric)|string> $input, string $appId, string|null $userId[, null|string $customId = '' ]) : mixed
Parameters
$taskTypeId : string
$input : array<string, array<int, (numeric)|string>|(numeric)|string>
$appId : string
$userId : string|null
$customId : null|string = ''

An arbitrary customId for this task. max length: 255 chars

Tags
since
30.0.0

getAppId()

public final getAppId() : string
Tags
since
30.0.0
Return values
string

getCompletionExpectedAt()

public final getCompletionExpectedAt() : DateTime|null
Tags
since
30.0.0
Return values
DateTime|null

getCustomId()

public final getCustomId() : null|string
Tags
since
30.0.0
Return values
null|string

getEndedAt()

public final getEndedAt() : int|null
Tags
since
30.0.0
Return values
int|null

getErrorMessage()

public final getErrorMessage() : string|null
Tags
since
30.0.0
Return values
string|null

getId()

public final getId() : int|null
Tags
since
30.0.0
Return values
int|null

getInput()

public final getInput() : array<string|int, array<int, (numeric)|string>|(numeric)|string>
Tags
since
30.0.0
Return values
array<string|int, array<int, (numeric)|string>|(numeric)|string>

getLastUpdated()

public final getLastUpdated() : int
Tags
since
30.0.0
Return values
int

getOutput()

public final getOutput() : array<string|int, array<int, (numeric)|string>|(numeric)|string>|null
Tags
since
30.0.0
Return values
array<string|int, array<int, (numeric)|string>|(numeric)|string>|null

getProgress()

public final getProgress() : float|null
Tags
since
30.0.0
Return values
float|null

getScheduledAt()

public final getScheduledAt() : int|null
Tags
since
30.0.0
Return values
int|null

getStartedAt()

public final getStartedAt() : int|null
Tags
since
30.0.0
Return values
int|null

getStatus()

public final getStatus() : int
Tags
psalm-return

self::STATUS_*

since
30.0.0
Return values
int

getTaskTypeId()

public final getTaskTypeId() : string
Tags
since
30.0.0
Return values
string

getUserId()

public final getUserId() : string|null
Tags
since
30.0.0
Return values
string|null

getWebhookMethod()

public final getWebhookMethod() : null|string
Tags
since
30.0.0
Return values
null|string

getWebhookUri()

public final getWebhookUri() : null|string
Tags
since
30.0.0
Return values
null|string

jsonSerialize()

public final jsonSerialize() : array<string|int, mixed>
Tags
psalm-return

array{id: ?int, lastUpdated: int, type: string, status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN', userId: ?string, appId: string, input: array<array-key, list<numeric|string>|numeric|string>, output: ?array<array-key, list<numeric|string>|numeric|string>, customId: ?string, completionExpectedAt: ?int, progress: ?float, scheduledAt: ?int, startedAt: ?int, endedAt: ?int}

since
30.0.0
Return values
array<string|int, mixed>

setCompletionExpectedAt()

public final setCompletionExpectedAt(DateTime|null $at) : void
Parameters
$at : DateTime|null
Tags
since
30.0.0

setEndedAt()

public final setEndedAt(int|null $endedAt) : void
Parameters
$endedAt : int|null
Tags
since
30.0.0

setErrorMessage()

public final setErrorMessage(string|null $error) : void
Parameters
$error : string|null
Tags
since
30.0.0

setId()

public final setId(int|null $id) : void
Parameters
$id : int|null
Tags
since
30.0.0

setInput()

public final setInput(array<string|int, mixed> $input) : void
Parameters
$input : array<string|int, mixed>
Tags
since
30.0.0

setLastUpdated()

public final setLastUpdated(int $lastUpdated) : void
Parameters
$lastUpdated : int
Tags
since
30.0.0

setOutput()

public final setOutput(null|array<string|int, array<int, (numeric)|string>|(numeric)|string> $output) : void
Parameters
$output : null|array<string|int, array<int, (numeric)|string>|(numeric)|string>
Tags
since
30.0.0

setProgress()

public final setProgress(float|null $progress) : void
Parameters
$progress : float|null
Tags
throws
ValidationException
since
30.0.0

setScheduledAt()

public final setScheduledAt(int|null $scheduledAt) : void
Parameters
$scheduledAt : int|null
Tags
since
30.0.0

setStartedAt()

public final setStartedAt(int|null $startedAt) : void
Parameters
$startedAt : int|null
Tags
since
30.0.0

setStatus()

public final setStatus(int $status) : void
Parameters
$status : int
Tags
psalm-param

self::STATUS_* $status

since
30.0.0

setWebhookMethod()

public final setWebhookMethod(string|null $webhookMethod) : void
Parameters
$webhookMethod : string|null
Tags
since
30.0.0

setWebhookUri()

public final setWebhookUri(string|null $webhookUri) : void
Parameters
$webhookUri : string|null
Tags
since
30.0.0

statusToString()

public final static statusToString(int $status) : "STATUS_CANCELLED"|"STATUS_FAILED"|"STATUS_SUCCESSFUL"|"STATUS_RUNNING"|"STATUS_SCHEDULED"|"STATUS_UNKNOWN"
Parameters
$status : int
Tags
since
30.0.0
Return values
"STATUS_CANCELLED"|"STATUS_FAILED"|"STATUS_SUCCESSFUL"|"STATUS_RUNNING"|"STATUS_SCHEDULED"|"STATUS_UNKNOWN"

        
On this page

Search results