$65 GRAYBYTE WORDPRESS FILE MANAGER $36

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

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

HOME
Current File : /opt/alt/php54/usr/share/pear/Symfony/Component/Validator//ConstraintViolation.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;

/**
 * Default implementation of {@ConstraintViolationInterface}.
 *
 * @author Bernhard Schussek <[email protected]>
 */
class ConstraintViolation implements ConstraintViolationInterface
{
    /**
     * @var string
     */
    private $message;

    /**
     * @var string
     */
    private $messageTemplate;

    /**
     * @var array
     */
    private $messageParameters;

    /**
     * @var integer|null
     */
    private $messagePluralization;

    /**
     * @var mixed
     */
    private $root;

    /**
     * @var string
     */
    private $propertyPath;

    /**
     * @var mixed
     */
    private $invalidValue;

    /**
     * @var mixed
     */
    private $code;

    /**
     * Creates a new constraint violation.
     *
     * @param string       $message               The violation message.
     * @param string       $messageTemplate       The raw violation message.
     * @param array        $messageParameters     The parameters to substitute
     *                                            in the raw message.
     * @param mixed        $root                  The value originally passed
     *                                            to the validator.
     * @param string       $propertyPath          The property path from the
     *                                            root value to the invalid
     *                                            value.
     * @param mixed        $invalidValue          The invalid value causing the
     *                                            violation.
     * @param integer|null $messagePluralization  The pluralization parameter.
     * @param mixed        $code                  The error code of the
     *                                            violation, if any.
     */
    public function __construct($message, $messageTemplate, array $messageParameters, $root, $propertyPath, $invalidValue, $messagePluralization = null, $code = null)
    {
        $this->message = $message;
        $this->messageTemplate = $messageTemplate;
        $this->messageParameters = $messageParameters;
        $this->messagePluralization = $messagePluralization;
        $this->root = $root;
        $this->propertyPath = $propertyPath;
        $this->invalidValue = $invalidValue;
        $this->code = $code;
    }

    /**
     * Converts the violation into a string for debugging purposes.
     *
     * @return string The violation as string.
     */
    public function __toString()
    {
        if (is_object($this->root)) {
            $class = get_class($this->root);
        } elseif (is_array($this->root)) {
            $class = "Array";
        } else {
            $class = (string) $this->root;
        }

        $propertyPath = (string) $this->propertyPath;
        $code = $this->code;

        if ('' !== $propertyPath && '[' !== $propertyPath[0] && '' !== $class) {
            $class .= '.';
        }

        if (!empty($code)) {
            $code = ' (code '.$code.')';
        }

        return $class.$propertyPath.":\n    ".$this->getMessage().$code;
    }

    /**
     * {@inheritDoc}
     */
    public function getMessageTemplate()
    {
        return $this->messageTemplate;
    }

    /**
     * {@inheritDoc}
     */
    public function getMessageParameters()
    {
        return $this->messageParameters;
    }

    /**
     * {@inheritDoc}
     */
    public function getMessagePluralization()
    {
        return $this->messagePluralization;
    }

    /**
     * {@inheritDoc}
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * {@inheritDoc}
     */
    public function getRoot()
    {
        return $this->root;
    }

    /**
     * {@inheritDoc}
     */
    public function getPropertyPath()
    {
        return $this->propertyPath;
    }

    /**
     * {@inheritDoc}
     */
    public function getInvalidValue()
    {
        return $this->invalidValue;
    }

    /**
     * {@inheritDoc}
     */
    public function getCode()
    {
        return $this->code;
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


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

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF