public function ClassMetadata::setGroupSequenceProvider in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Mapping/ClassMetadata.php \Symfony\Component\Validator\Mapping\ClassMetadata::setGroupSequenceProvider()
Sets whether a group sequence provider should be used.
Parameters
bool $active:
Throws
File
- vendor/
symfony/ validator/ Mapping/ ClassMetadata.php, line 514
Class
- ClassMetadata
- Default implementation of {@link ClassMetadataInterface}.
Namespace
Symfony\Component\Validator\MappingCode
public function setGroupSequenceProvider($active) {
if ($this
->hasGroupSequence()) {
throw new GroupDefinitionException('Defining a group sequence provider is not allowed with a static group sequence');
}
if (!$this
->getReflectionClass()
->implementsInterface('Symfony\\Component\\Validator\\GroupSequenceProviderInterface')) {
throw new GroupDefinitionException(sprintf('Class "%s" must implement GroupSequenceProviderInterface', $this->name));
}
$this->groupSequenceProvider = $active;
}