Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. IDRightPart.php

class IDRightPart

Hierarchy

  • class \Egulias\EmailValidator\Parser\PartParser
    • class \Egulias\EmailValidator\Parser\DomainPart extends \Egulias\EmailValidator\Parser\PartParser
      • class \Egulias\EmailValidator\Parser\IDRightPart extends \Egulias\EmailValidator\Parser\DomainPart

Expanded class hierarchy of IDRightPart

1 file declares its use of IDRightPart
MessageIDParser.php in vendor/egulias/email-validator/src/MessageIDParser.php

File

vendor/egulias/email-validator/src/Parser/IDRightPart.php, line 11

Namespace

Egulias\EmailValidator\Parser
View source
class IDRightPart extends DomainPart {
    protected function validateTokens(bool $hasComments) : Result {
        $invalidDomainTokens = [
            EmailLexer::S_DQUOTE => true,
            EmailLexer::S_SQUOTE => true,
            EmailLexer::S_BACKTICK => true,
            EmailLexer::S_SEMICOLON => true,
            EmailLexer::S_GREATERTHAN => true,
            EmailLexer::S_LOWERTHAN => true,
        ];
        if (isset($invalidDomainTokens[$this->lexer->current->type])) {
            return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->current->value), $this->lexer->current->value);
        }
        return new ValidEmail();
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
DomainPart::$domainPart protected property
DomainPart::$label protected property
DomainPart::addTLDWarnings private function
DomainPart::checkDomainPartExceptions protected function
DomainPart::checkEmptyDomain private function
DomainPart::checkEndOfDomain private function
DomainPart::checkInvalidTokensAfterAT private function
DomainPart::checkLabelLength private function
DomainPart::checkNotAllowedChars private function
DomainPart::domainPart public function
DomainPart::DOMAIN_MAX_LENGTH public constant
DomainPart::doParseDomainPart protected function
DomainPart::isLabelTooLong private function
DomainPart::LABEL_MAX_LENGTH public constant
DomainPart::parse public function Overrides PartParser::parse
DomainPart::parseComments protected function
DomainPart::parseDomainLiteral protected function
DomainPart::performDomainStartChecks private function
IDRightPart::validateTokens protected function Overrides DomainPart::validateTokens
PartParser::$lexer protected property
PartParser::$warnings protected property
PartParser::checkConsecutiveDots protected function
PartParser::escaped protected function
PartParser::getWarnings public function
PartParser::parseFWS protected function
PartParser::__construct public function 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal