Documentation

Validation
in package

Database ID and tag validation utilities.

Provides methods for validating language IDs, text IDs, and tag IDs against the database to ensure they exist.

Tags
since
3.0.0

Table of Contents

Methods

archTextTag()  : string
Validate a tag ID for archived texts.
language()  : string
Validate a language ID.
tag()  : string
Validate a tag ID for words.
text()  : string
Validate a text ID.
textTag()  : string
Validate a tag ID for texts.

Methods

archTextTag()

Validate a tag ID for archived texts.

public static archTextTag(string $currenttag, string $currentlang) : string
Parameters
$currenttag : string

Tag ID to validate

$currentlang : string

Optional language ID filter

Return values
string

'' if invalid, $currenttag otherwise

language()

Validate a language ID.

public static language(string $currentlang) : string
Parameters
$currentlang : string

Language ID to validate

Return values
string

'' if the language is not valid, $currentlang otherwise

tag()

Validate a tag ID for words.

public static tag(string $currenttag, string $currentlang) : string
Parameters
$currenttag : string

Tag ID to validate

$currentlang : string

Optional language ID filter

Return values
string

'' if invalid, $currenttag otherwise

text()

Validate a text ID.

public static text(string $currenttext) : string
Parameters
$currenttext : string

Text ID to validate

Return values
string

'' if the text is not valid, $currenttext otherwise

textTag()

Validate a tag ID for texts.

public static textTag(string $currenttag, string $currentlang) : string
Parameters
$currenttag : string

Tag ID to validate

$currentlang : string

Optional language ID filter

Return values
string

'' if invalid, $currenttag otherwise


        
On this page

Search results