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

Breadcrumb

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

function DomainPart::parseDomainLiteral

Return value

Result

1 call to DomainPart::parseDomainLiteral()
DomainPart::doParseDomainPart in vendor/egulias/email-validator/src/Parser/DomainPart.php

File

vendor/egulias/email-validator/src/Parser/DomainPart.php, line 233

Class

DomainPart

Namespace

Egulias\EmailValidator\Parser

Code

protected function parseDomainLiteral() : Result {
    try {
        $this->lexer
            ->find(EmailLexer::S_CLOSEBRACKET);
    } catch (\RuntimeException $e) {
        return new InvalidEmail(new ExpectingDomainLiteralClose(), $this->lexer->current->value);
    }
    $domainLiteralParser = new DomainLiteralParser($this->lexer);
    $result = $domainLiteralParser->parse();
    $this->warnings = [
        $this->warnings,
        $domainLiteralParser->getWarnings(),
    ];
    return $result;
}
RSS feed
Powered by Drupal