PHP 8.2.30
Preview: FormError.php Size: 2.50 KB
/opt/cloudlinux/alt-php54/root/usr/share/pear/Symfony/Component/Form/FormError.php

<?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\Form;

/**
 * Wraps errors in forms
 *
 * @author Bernhard Schussek <bschussek@gmail.com>
 */
class FormError
{
    /**
     * @var string
     */
    private $message;

    /**
     * The template for the error message
     * @var string
     */
    protected $messageTemplate;

    /**
     * The parameters that should be substituted in the message template
     * @var array
     */
    protected $messageParameters;

    /**
     * The value for error message pluralization
     * @var integer|null
     */
    protected $messagePluralization;

    /**
     * Constructor
     *
     * Any array key in $messageParameters will be used as a placeholder in
     * $messageTemplate.
     *
     * @param string       $message              The translated error message
     * @param string|null  $messageTemplate      The template for the error message
     * @param array        $messageParameters    The parameters that should be
     *                                           substituted in the message template.
     * @param integer|null $messagePluralization The value for error message pluralization
     *
     * @see \Symfony\Component\Translation\Translator
     */
    public function __construct($message, $messageTemplate = null, array $messageParameters = array(), $messagePluralization = null)
    {
        $this->message = $message;
        $this->messageTemplate = $messageTemplate ?: $message;
        $this->messageParameters = $messageParameters;
        $this->messagePluralization = $messagePluralization;
    }

    /**
     * Returns the error message
     *
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * Returns the error message template
     *
     * @return string
     */
    public function getMessageTemplate()
    {
        return $this->messageTemplate;
    }

    /**
     * Returns the parameters to be inserted in the message template
     *
     * @return array
     */
    public function getMessageParameters()
    {
        return $this->messageParameters;
    }

    /**
     * Returns the value for error message pluralization.
     *
     * @return integer|null
     */
    public function getMessagePluralization()
    {
        return $this->messagePluralization;
    }
}

Directory Contents

Dirs: 6 × Files: 49

Name Size Perms Modified Actions
Exception DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Extension DIR
- drwxr-xr-x 2024-03-03 22:54:50
Edit Download
Guess DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Resources DIR
- drwxr-xr-x 2024-03-03 22:54:50
Edit Download
Test DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
Util DIR
- drwxr-xr-x 2024-03-03 22:54:51
Edit Download
4.77 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
7.46 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.05 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
993 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
334 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
8.62 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
18.09 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
462 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.09 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
559 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.10 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.08 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
34.05 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
7.69 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.28 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
21.17 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
8.46 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
6.29 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.50 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.22 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.11 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.63 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
5.10 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.52 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.99 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
4.14 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
8.13 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
4.64 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.41 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
11.67 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
6.90 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.20 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
5.76 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.08 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.81 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.12 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.15 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.44 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
5.48 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
2.26 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
668 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
7.48 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
658 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.27 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
3.23 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.23 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
1.11 KB lrw-r--r-- 2019-12-18 11:22:56
Edit Download
624 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download
474 B lrw-r--r-- 2019-12-18 11:22:56
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).