protected function EmailLexer::getType in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/egulias/email-validator/src/Egulias/EmailValidator/EmailLexer.php \Egulias\EmailValidator\EmailLexer::getType()
Retrieve token type. Also processes the token value if necessary.
Parameters
string $value:
Return value
integer
Throws
\InvalidArgumentException
Overrides AbstractLexer::getType
File
- vendor/
egulias/ email-validator/ src/ Egulias/ EmailValidator/ EmailLexer.php, line 166
Class
Namespace
Egulias\EmailValidatorCode
protected function getType(&$value) {
if ($this
->isNullType($value)) {
return self::C_NUL;
}
if ($this
->isValid($value)) {
return $this->charValue[$value];
}
if ($this
->isUTF8Invalid($value)) {
$this->hasInvalidTokens = true;
return self::INVALID;
}
return self::GENERIC;
}