function AttributeLoader::getAttributes
1 call to AttributeLoader::getAttributes()
- AttributeLoader::loadClassMetadata in vendor/
symfony/ validator/ Mapping/ Loader/ AttributeLoader.php - Loads validation metadata into a {@link ClassMetadata} instance.
File
-
vendor/
symfony/ validator/ Mapping/ Loader/ AttributeLoader.php, line 84
Class
- AttributeLoader
- Loads validation metadata using PHP attributes.
Namespace
Symfony\Component\Validator\Mapping\LoaderCode
private function getAttributes(\ReflectionMethod|\ReflectionClass|\ReflectionProperty $reflection) : iterable {
foreach ($reflection->getAttributes(GroupSequence::class) as $attribute) {
(yield $attribute->newInstance());
}
foreach ($reflection->getAttributes(GroupSequenceProvider::class) as $attribute) {
(yield $attribute->newInstance());
}
foreach ($reflection->getAttributes(Constraint::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) {
(yield $attribute->newInstance());
}
}