PHP Class Vanilla\Utility\NameScheme

Afficher le fichier Open project: vanilla/vanilla

Méthodes publiques

Méthode Description
convert ( string $name ) : string Convert a name into this name spec.
convertArrayKeys ( array $array, array $keysSkipRecursion = [] ) : array Recursively convert all of the array keys in an array to this name scheme.
valid ( string $name ) : boolean Test that a name is valid for this scheme.

Method Details

convert() abstract public méthode

Convert a name into this name spec.
abstract public convert ( string $name ) : string
$name string The name to convert to this scheme.
Résultat string Returns the new name as a string.

convertArrayKeys() public méthode

Recursively convert all of the array keys in an array to this name scheme.
public convertArrayKeys ( array $array, array $keysSkipRecursion = [] ) : array
$array array The array to convert.
$keysSkipRecursion array Skip recursion for the following keys.
Résultat array Returns the converted array.

valid() public méthode

Test that a name is valid for this scheme.
public valid ( string $name ) : boolean
$name string The name to test.
Résultat boolean Returns **true** if the name is valid for this spec or **false** otherwise.