ARK Management Tools

Validator
in package

Validator.

Methods for validating ARKs.

Table of Contents

Methods

followsArkCharacterRepetoire()  : bool
String follows ARK character repetoire.
followsNaanCharacterRepetoire()  : bool
String follows NAAN character repetoire.
isValidBaseCompactName()  : bool
Base Compact Name Validator.
isValidCheckZone()  : bool
Check Zone Validator.
isValidNaan()  : bool
NAAN Validator.
shoulderInXdigits()  : bool
Shoulder Validator.

Methods

followsArkCharacterRepetoire()

String follows ARK character repetoire.

public static followsArkCharacterRepetoire(string $subject[, bool $reservedChars = true ]) : bool

Check if the string contains only characters that are valid for forming ARKs.

Parameters
$subject : string

The input string.

$reservedChars : bool = true

Check conformance, including the reserved character: % - . / (default: true)

Tags
link
https://www.ietf.org/archive/id/draft-kunze-ark-39.html#name-character-repertoires
Return values
bool

isValidBaseCompactName()

Base Compact Name Validator.

public static isValidBaseCompactName(string $subject) : bool

Check if string conforms to the pattern of ark:[/]{NAAN}/{Base Name}.

Parameters
$subject : string

The input string.

Return values
bool

isValidCheckZone()

Check Zone Validator.

public static isValidCheckZone(string $subject) : bool

Check if string conforms to the pattern of {NAAN}/{Base Name}.

Parameters
$subject : string

The input string.

Return values
bool

isValidNaan()

NAAN Validator.

public static isValidNaan(string $subject) : bool

Check if given string conforms as valid NAAN.

Parameters
$subject : string

The input string.

Return values
bool

shoulderInXdigits()

Shoulder Validator.

public static shoulderInXdigits(string $shoulder, string $xdigits) : bool

Check if shoulder contains only character which are also in the character repetoire.

Parameters
$shoulder : string

Shoulder

$xdigits : string

character repetoire.

Return values
bool

        
On this page

Search results