$50 GRAYBYTE WORDPRESS FILE MANAGER $13

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php53/usr/share/pear/Symfony/Component/Validator/

HOME
Current File : /opt/alt/php53/usr/share/pear/Symfony/Component/Validator//ConstraintValidatorFactory.php
<?php

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

namespace Symfony\Component\Validator;

use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\Validator\Constraints\ExpressionValidator;

/**
 * Default implementation of the ConstraintValidatorFactoryInterface.
 *
 * This enforces the convention that the validatedBy() method on any
 * Constraint will return the class name of the ConstraintValidator that
 * should validate the Constraint.
 *
 * @author Bernhard Schussek <[email protected]>
 */
class ConstraintValidatorFactory implements ConstraintValidatorFactoryInterface
{
    protected $validators = array();

    /**
     * @var PropertyAccessorInterface
     */
    private $propertyAccessor;

    public function __construct(PropertyAccessorInterface $propertyAccessor = null)
    {
        $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor();
    }

    /**
     * {@inheritDoc}
     */
    public function getInstance(Constraint $constraint)
    {
        $className = $constraint->validatedBy();

        // The second condition is a hack that is needed when CollectionValidator
        // calls itself recursively (Collection constraints can be nested).
        // Since the context of the validator is overwritten when initialize()
        // is called for the nested constraint, the outer validator is
        // acting on the wrong context when the nested validation terminates.
        //
        // A better solution - which should be approached in Symfony 3.0 - is to
        // remove the initialize() method and pass the context as last argument
        // to validate() instead.
        if (!isset($this->validators[$className]) || 'Symfony\Component\Validator\Constraints\CollectionValidator' === $className) {
            $this->validators[$className] = 'validator.expression' === $className
                ? new ExpressionValidator($this->propertyAccessor)
                : new $className();
        }

        return $this->validators[$className];
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.55 PM
root / root
0755
Constraints
--
3 Mar 2024 10.55 PM
root / root
0755
Exception
--
3 Mar 2024 10.55 PM
root / root
0755
Mapping
--
3 Mar 2024 10.55 PM
root / root
0755
Resources
--
3 Mar 2024 10.55 PM
root / root
0755
ClassBasedInterface.php
0.559 KB
18 Dec 2019 11.20 AM
root / root
0644
Constraint.php
6.638 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintValidator.php
0.684 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintValidatorFactory.php
2.243 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintValidatorFactoryInterface.php
0.757 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintValidatorInterface.php
0.878 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintViolation.php
4.232 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintViolationInterface.php
4.251 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintViolationList.php
3.169 KB
18 Dec 2019 11.20 AM
root / root
0644
ConstraintViolationListInterface.php
1.961 KB
18 Dec 2019 11.20 AM
root / root
0644
DefaultTranslator.php
5.122 KB
18 Dec 2019 11.20 AM
root / root
0644
ExecutionContext.php
8.296 KB
18 Dec 2019 11.20 AM
root / root
0644
ExecutionContextInterface.php
12.065 KB
18 Dec 2019 11.20 AM
root / root
0644
GlobalExecutionContextInterface.php
1.892 KB
18 Dec 2019 11.20 AM
root / root
0644
GroupSequenceProviderInterface.php
0.583 KB
18 Dec 2019 11.20 AM
root / root
0644
MetadataFactoryInterface.php
0.967 KB
18 Dec 2019 11.20 AM
root / root
0644
MetadataInterface.php
2.823 KB
18 Dec 2019 11.20 AM
root / root
0644
ObjectInitializerInterface.php
0.798 KB
18 Dec 2019 11.20 AM
root / root
0644
PropertyMetadataContainerInterface.php
1.181 KB
18 Dec 2019 11.20 AM
root / root
0644
PropertyMetadataInterface.php
1.229 KB
18 Dec 2019 11.20 AM
root / root
0644
Validation.php
1.072 KB
18 Dec 2019 11.20 AM
root / root
0644
ValidationVisitor.php
6.174 KB
18 Dec 2019 11.20 AM
root / root
0644
ValidationVisitorInterface.php
3.465 KB
18 Dec 2019 11.20 AM
root / root
0644
Validator.php
6.524 KB
18 Dec 2019 11.20 AM
root / root
0644
ValidatorBuilder.php
9.846 KB
18 Dec 2019 11.20 AM
root / root
0644
ValidatorBuilderInterface.php
5.37 KB
18 Dec 2019 11.20 AM
root / root
0644
ValidatorInterface.php
3.496 KB
18 Dec 2019 11.20 AM
root / root
0644
autoloader.php
0.331 KB
18 Dec 2019 11.20 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF