You are here

protected function DomainPart::parseDomainLiteral in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php \Egulias\EmailValidator\Parser\DomainPart::parseDomainLiteral()
1 call to DomainPart::parseDomainLiteral()
DomainPart::doParseDomainPart in vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php

File

vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/DomainPart.php, line 139

Class

DomainPart

Namespace

Egulias\EmailValidator\Parser

Code

protected function parseDomainLiteral() {
  if ($this->lexer
    ->isNextToken(EmailLexer::S_COLON)) {
    $this->warnings[] = EmailValidator::RFC5322_IPV6_COLONSTRT;
  }
  if ($this->lexer
    ->isNextToken(EmailLexer::S_IPV6TAG)) {
    $lexer = clone $this->lexer;
    $lexer
      ->moveNext();
    if ($lexer
      ->isNextToken(EmailLexer::S_DOUBLECOLON)) {
      $this->warnings[] = EmailValidator::RFC5322_IPV6_COLONSTRT;
    }
  }
  return $this
    ->doParseDomainLiteral();
}