REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.75 KB
Close
/proc/thread-self/root/home/byroehnu/easetack.com/vendor/egulias/email-validator/src/Parser.php
Text
Base64
<?php namespace Egulias\EmailValidator; use Egulias\EmailValidator\Result\Result; use Egulias\EmailValidator\Result\ValidEmail; use Egulias\EmailValidator\Result\InvalidEmail; use Egulias\EmailValidator\Result\Reason\ExpectingATEXT; abstract class Parser { /** * @var Warning\Warning[] */ protected $warnings = []; /** * @var EmailLexer */ protected $lexer; /** * id-left "@" id-right */ abstract protected function parseRightFromAt(): Result; abstract protected function parseLeftFromAt(): Result; abstract protected function preLeftParsing(): Result; public function __construct(EmailLexer $lexer) { $this->lexer = $lexer; } public function parse(string $str): Result { $this->lexer->setInput($str); if ($this->lexer->hasInvalidTokens()) { return new InvalidEmail(new ExpectingATEXT("Invalid tokens found"), $this->lexer->current->value); } $preParsingResult = $this->preLeftParsing(); if ($preParsingResult->isInvalid()) { return $preParsingResult; } $localPartResult = $this->parseLeftFromAt(); if ($localPartResult->isInvalid()) { return $localPartResult; } $domainPartResult = $this->parseRightFromAt(); if ($domainPartResult->isInvalid()) { return $domainPartResult; } return new ValidEmail(); } /** * @return Warning\Warning[] */ public function getWarnings(): array { return $this->warnings; } protected function hasAtToken(): bool { $this->lexer->moveNext(); $this->lexer->moveNext(); return !$this->lexer->current->isA(EmailLexer::S_AT); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 4 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Parser
DIR
-
drwxrwxrwx
2025-05-16 16:14:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Result
DIR
-
drwxrwxrwx
2025-05-16 16:14:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Validation
DIR
-
drwxrwxrwx
2025-05-16 16:14:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Warning
DIR
-
drwxrwxrwx
2025-05-16 16:14:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EmailLexer.php
8.50 KB
lrw-rw-rw-
2025-03-06 22:45:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EmailParser.php
2.32 KB
lrw-rw-rw-
2025-03-06 22:45:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EmailValidator.php
1.21 KB
lrw-rw-rw-
2025-03-06 22:45:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MessageIDParser.php
2.29 KB
lrw-rw-rw-
2025-03-06 22:45:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Parser.php
1.75 KB
lrw-rw-rw-
2025-03-06 22:45:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).