REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.79 KB
Close
//opt/cloudlinux/alt-php53/root/usr/share/pear/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php
Text
Base64
<?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\Extension\Validator; use Symfony\Component\Form\Extension\Validator\Constraints\Form; use Symfony\Component\Form\AbstractExtension; use Symfony\Component\Validator\ValidatorInterface; use Symfony\Component\Validator\Constraints\Valid; /** * Extension supporting the Symfony2 Validator component in forms. * * @author Bernhard Schussek <bschussek@gmail.com> */ class ValidatorExtension extends AbstractExtension { private $validator; public function __construct(ValidatorInterface $validator) { $this->validator = $validator; // Register the form constraints in the validator programmatically. // This functionality is required when using the Form component without // the DIC, where the XML file is loaded automatically. Thus the following // code must be kept synchronized with validation.xml /** @var \Symfony\Component\Validator\Mapping\ClassMetadata $metadata */ $metadata = $this->validator->getMetadataFactory()->getMetadataFor('Symfony\Component\Form\Form'); $metadata->addConstraint(new Form()); $metadata->addPropertyConstraint('children', new Valid()); } public function loadTypeGuesser() { return new ValidatorTypeGuesser($this->validator->getMetadataFactory()); } protected function loadTypeExtensions() { return array( new Type\FormTypeValidatorExtension($this->validator), new Type\RepeatedTypeValidatorExtension(), new Type\SubmitTypeValidatorExtension(), ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 5 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Constraints
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EventListener
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Type
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Util
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ViolationMapper
DIR
-
drwxr-xr-x
2024-03-03 22:55:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ValidatorExtension.php
1.79 KB
lrw-r--r--
2019-12-18 11:20:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ValidatorTypeGuesser.php
10.61 KB
lrw-r--r--
2019-12-18 11:20:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).