ObjDef
in package
Base class for class-level attributes in the phpEZ framework.
Provides a reusable foundation for declaring metadata attributes on classes. Subclasses define behavior (e.g., ObjDef) that affects serialization, deserialization, and validation of Obj instances.
Attributes
- #[Attribute]
- \Attribute::TARGET_CLASS
Table of Contents
Methods
- of() : static|false
- Extract an attribute instance from a reflected class.
Methods
of()
Extract an attribute instance from a reflected class.
public
static of(string $class) : static|false
Searches the class's attributes for one matching this class name and instantiates it with the attribute's arguments.
Parameters
- $class : string
-
The class to inspect for attributes.
Return values
static|false —The attribute instance if found, false otherwise.