Documentation

TermStatsMethods

Statistics, update, and bulk operation methods for MySqlTermRepository.

Provides methods for updating individual term fields, bulk operations on multiple terms, and statistical/distribution queries.

Tags
since
3.0.0

Table of Contents

Methods

deleteMultiple()  : int
{@inheritdoc}
getLanguagesWithTerms()  : array<string|int, int>
Get language IDs that have terms.
getStatistics()  : array<string|int, mixed>
{@inheritdoc}
getStatusDistribution()  : array<int, int>
Get status distribution counts.
getWordCountDistribution()  : array<int, int>
Get term count by word count.
updateLemma()  : bool
Update the lemma (base form) of a term.
updateNotes()  : bool
Update the notes of a term.
updateRomanization()  : bool
{@inheritdoc}
updateScores()  : bool
Update review scores for a term.
updateSentence()  : bool
Update the example sentence of a term.
updateStatus()  : bool
{@inheritdoc}
updateStatusMultiple()  : int
{@inheritdoc}
updateTranslation()  : bool
{@inheritdoc}
query()  : QueryBuilder
Get a query builder for this repository's table.

Methods

deleteMultiple()

{@inheritdoc}

public deleteMultiple(array<string|int, mixed> $termIds) : int
Parameters
$termIds : array<string|int, mixed>
Return values
int

getLanguagesWithTerms()

Get language IDs that have terms.

public getLanguagesWithTerms() : array<string|int, int>
Return values
array<string|int, int>

Array of language IDs

getStatistics()

{@inheritdoc}

public getStatistics([int|null $languageId = null ]) : array<string|int, mixed>
Parameters
$languageId : int|null = null
Return values
array<string|int, mixed>

getStatusDistribution()

Get status distribution counts.

public getStatusDistribution([int|null $languageId = null ]) : array<int, int>
Parameters
$languageId : int|null = null

Language ID (null for all)

Return values
array<int, int>

Status value => count

getWordCountDistribution()

Get term count by word count.

public getWordCountDistribution([int|null $languageId = null ]) : array<int, int>
Parameters
$languageId : int|null = null

Language ID (null for all)

Return values
array<int, int>

Word count => term count

updateLemma()

Update the lemma (base form) of a term.

public updateLemma(int $termId, string|null $lemma) : bool
Parameters
$termId : int

Term ID

$lemma : string|null

New lemma (null to clear)

Return values
bool

True if updated

updateNotes()

Update the notes of a term.

public updateNotes(int $termId, string $notes) : bool
Parameters
$termId : int

Term ID

$notes : string

New notes

Return values
bool

True if updated

updateRomanization()

{@inheritdoc}

public updateRomanization(int $termId, string $romanization) : bool
Parameters
$termId : int
$romanization : string
Return values
bool

updateScores()

Update review scores for a term.

public updateScores(int $termId, float $todayScore, float $tomorrowScore) : bool
Parameters
$termId : int

Term ID

$todayScore : float

Today's score

$tomorrowScore : float

Tomorrow's score

Return values
bool

True if updated

updateSentence()

Update the example sentence of a term.

public updateSentence(int $termId, string $sentence) : bool
Parameters
$termId : int

Term ID

$sentence : string

New sentence

Return values
bool

True if updated

updateStatus()

{@inheritdoc}

public updateStatus(int $termId, int $status) : bool
Parameters
$termId : int
$status : int
Return values
bool

updateStatusMultiple()

{@inheritdoc}

public updateStatusMultiple(array<string|int, mixed> $termIds, int $status) : int
Parameters
$termIds : array<string|int, mixed>
$status : int
Return values
int

updateTranslation()

{@inheritdoc}

public updateTranslation(int $termId, string $translation) : bool
Parameters
$termId : int
$translation : string
Return values
bool

        
On this page

Search results