Class LaravelUi5\OData\Service\Discovery\AttributeReader

final
readonly

Reads PHP #[Attribute] annotations that implement TypedAnnotationInterface from Reflection objects and returns them as AnnotationInterface instances.

This is the bridge between PHP attribute syntax and the Edm annotation model. It has no framework dependencies and produces no side effects — callers are responsible for attaching the returned annotations to their EDM model objects.

Usage: $annotations = (new AttributeReader)->readClass(new ReflectionClass($class)); // pass $annotations into the EDM model object constructor via HasAnnotations

Attributes that do not implement TypedAnnotationInterface are silently skipped; they belong to other framework layers (routing, ORM, validation, etc.).

Methods