!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/queuepro/vendor/egulias/email-validator/src/Validation/   drwxrwxr-x
Free 13.25 GB of 57.97 GB (22.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     MultipleValidationWithAnd.php (2.86 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Egulias\EmailValidator\Validation;

use 
Egulias\EmailValidator\EmailLexer;
use 
Egulias\EmailValidator\Result\InvalidEmail;
use 
Egulias\EmailValidator\Validation\Exception\EmptyValidationList;
use 
Egulias\EmailValidator\Result\MultipleErrors;

class 
MultipleValidationWithAnd implements EmailValidation
{
    
/**
     * If one of validations fails, the remaining validations will be skept.
     * This means MultipleErrors will only contain a single error, the first found.
     */
    
const STOP_ON_ERROR 0;

    
/**
     * All of validations will be invoked even if one of them got failure.
     * So MultipleErrors will contain all causes.
     */
    
const ALLOW_ALL_ERRORS 1;

    
/**
     * @var EmailValidation[]
     */
    
private $validations = [];

    
/**
     * @var array
     */
    
private $warnings = [];

    
/**
     * @var MultipleErrors|null
     */
    
private $error;

    
/**
     * @var int
     */
    
private $mode;

    
/**
     * @param EmailValidation[] $validations The validations.
     * @param int               $mode        The validation mode (one of the constants).
     */
    
public function __construct(array $validations$mode self::ALLOW_ALL_ERRORS)
    {
        if (
count($validations) == 0) {
            throw new 
EmptyValidationList();
        }

        
$this->validations $validations;
        
$this->mode $mode;
    }

    
/**
     * {@inheritdoc}
     */
    
public function isValid(string $emailEmailLexer $emailLexer) : bool
    
{
        
$result true;
        foreach (
$this->validations as $validation) {
            
$emailLexer->reset();
            
$validationResult $validation->isValid($email$emailLexer);
            
$result $result && $validationResult;
            
$this->warnings array_merge($this->warnings$validation->getWarnings());
            if (!
$validationResult) {
                
$this->processError($validation);
            }

            if (
$this->shouldStop($result)) {
                break;
            }
        }

        return 
$result;
    }

    private function 
initErrorStorage() : void
    
{
        if (
null === $this->error) {
            
$this->error = new MultipleErrors();
        }
    }

    private function 
processError(EmailValidation $validation) : void
    
{
        if (
null !== $validation->getError()) {
            
$this->initErrorStorage();
            
/** @psalm-suppress PossiblyNullReference */
            
$this->error->addReason($validation->getError()->reason());
        }
    }

    private function 
shouldStop(bool $result) : bool
    
{
        return !
$result && $this->mode === self::STOP_ON_ERROR;
    }

    
/**
     * Returns the validation errors.
     */
    
public function getError() : ?InvalidEmail
    
{
        return 
$this->error;
    }

    
/**
     * {@inheritdoc}
     */
    
public function getWarnings() : array
    {
        return 
$this->warnings;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]--