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

Breadcrumb

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

class LocalComment

Hierarchy

  • class \Egulias\EmailValidator\Parser\CommentStrategy\LocalComment implements \Egulias\EmailValidator\Parser\CommentStrategy\CommentStrategy

Expanded class hierarchy of LocalComment

1 file declares its use of LocalComment
LocalPart.php in vendor/egulias/email-validator/src/Parser/LocalPart.php

File

vendor/egulias/email-validator/src/Parser/CommentStrategy/LocalComment.php, line 12

Namespace

Egulias\EmailValidator\Parser\CommentStrategy
View source
class LocalComment implements CommentStrategy {
    
    /**
     * @var array
     */
    private $warnings = [];
    public function exitCondition(EmailLexer $lexer, int $openedParenthesis) : bool {
        return !$lexer->isNextToken(EmailLexer::S_AT);
    }
    public function endOfLoopValidations(EmailLexer $lexer) : Result {
        if (!$lexer->isNextToken(EmailLexer::S_AT)) {
            return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->current->value);
        }
        $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
        return new ValidEmail();
    }
    public function getWarnings() : array {
        return $this->warnings;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
LocalComment::$warnings private property
LocalComment::endOfLoopValidations public function Overrides CommentStrategy::endOfLoopValidations
LocalComment::exitCondition public function Return "true" to continue, "false" to exit Overrides CommentStrategy::exitCondition
LocalComment::getWarnings public function Overrides CommentStrategy::getWarnings

API Navigation

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