CheckerPart
trait CheckerPart
Methods
Check if the string contains only alphanumeric characters.
Check if the string contains only alphanumeric characters.
Checks if the string is empty
Check if the string contains only lower case characters.
Check if the string contains only numeric characters.
Check if the string contains only characters which are not whitespace or an alphanumeric.
Check if the string contains only space characters.
Check if the string contains only upper case characters.
Details
at line 41
bool
isAlphabetic()
Check if the string contains only alphanumeric characters.
at line 32
bool
isAlphanumeric()
Check if the string contains only alphanumeric characters.
at line 23
bool
isEmpty()
Checks if the string is empty
at line 85
bool
isLowerCase()
Check if the string contains only lower case characters.
Spaces are considered non-lowercase characters, so lowercase strings with multiple words, separated by spaces, return false. E.g.:
$text = new Text('lowercase multi words string');
var_dump($text->isLowercase()); // false
at line 50
bool
isNumeric()
Check if the string contains only numeric characters.
at line 128
bool
isPlural(InflectorInterface|null $pluralizer = null)
Check if a string is plural form.
at line 59
bool
isPunctuation()
Check if the string contains only characters which are not whitespace or an alphanumeric.
at line 114
bool
isSingular(InflectorInterface|null $pluralizer = null)
Check if a string is singular form.
at line 68
bool
isSpace()
Check if the string contains only space characters.
at line 102
bool
isUpperCase()
Check if the string contains only upper case characters.
Spaces are considered non-uppercase characters, so uppercase strings with multiple words, separated by spaces, return false. E.g.:
$text = new Text('UPPERCASE MULTI WORDS STRING');
var_dump($text->isUppercase()); // false