Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
languages
/
wp-content-20241001222009
/
plugins
/
mailpoet
/
vendor-prefixed
/
symfony
/
validator
/
Constraints
:
Compound.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace MailPoetVendor\Symfony\Component\Validator\Constraints; if (!defined('ABSPATH')) exit; use MailPoetVendor\Symfony\Component\Validator\Constraint; use MailPoetVendor\Symfony\Component\Validator\Exception\ConstraintDefinitionException; abstract class Compound extends Composite { public $constraints = []; public function __construct($options = null) { if (isset($options[$this->getCompositeOption()])) { throw new ConstraintDefinitionException(\sprintf('You can\'t redefine the "%s" option. Use the "%s::getConstraints()" method instead.', $this->getCompositeOption(), __CLASS__)); } $this->constraints = $this->getConstraints($this->normalizeOptions($options)); parent::__construct($options); } protected final function getCompositeOption() : string { return 'constraints'; } public final function validatedBy() : string { return CompoundValidator::class; } protected abstract function getConstraints(array $options) : array; }