Documentation

ArchiveText

Use case for archiving and unarchiving texts.

Texts are archived by setting TxArchivedAt to the current timestamp. Unarchiving sets TxArchivedAt back to NULL.

Tags
since
3.0.0

Table of Contents

Methods

archiveMultiple()  : array{count: int}
Archive multiple texts.
execute()  : array{sentences: int, textItems: int, archived: int}
Archive an active text.
unarchive()  : array{success: bool, textId: ?int, unarchived: int, sentences: int, textItems: int, error: ?string}
Unarchive a text (restore from archived state).
unarchiveMultiple()  : array{count: int}
Unarchive multiple texts.

Methods

archiveMultiple()

Archive multiple texts.

public archiveMultiple(array<string|int, mixed> $textIds) : array{count: int}
Parameters
$textIds : array<string|int, mixed>

Array of text IDs

Return values
array{count: int}

Count of archived texts

execute()

Archive an active text.

public execute(int $textId) : array{sentences: int, textItems: int, archived: int}

Sets TxArchivedAt to current timestamp and deletes parsed data.

Parameters
$textId : int

Text ID

Return values
array{sentences: int, textItems: int, archived: int}

Counts

unarchive()

Unarchive a text (restore from archived state).

public unarchive(int $textId) : array{success: bool, textId: ?int, unarchived: int, sentences: int, textItems: int, error: ?string}

Sets TxArchivedAt to NULL and re-parses the text.

Parameters
$textId : int

Text ID (archived)

Return values
array{success: bool, textId: ?int, unarchived: int, sentences: int, textItems: int, error: ?string}

unarchiveMultiple()

Unarchive multiple texts.

public unarchiveMultiple(array<string|int, mixed> $textIds) : array{count: int}
Parameters
$textIds : array<string|int, mixed>

Array of archived text IDs

Return values
array{count: int}

Count of unarchived texts


        
On this page

Search results