public function ClassMetadata::setGroupSequenceProvider in Plug 7
Sets whether a group sequence provider should be used.
Parameters
bool $active:
Throws
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Mapping/ ClassMetadata.php, line 506
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;
}