ClassMetadataCache
class ClassMetadataCache
Properties
| static protected ReflectionClass<object>> | $classes | ||
| static protected ReflectionMethod>> | $methods | ||
| static protected array<class-string, array<string, mixed>> | $defaultProperties | ||
| static protected ReflectionProperty>> | $properties | ||
| static protected ReflectionProperty>> | $allProperties | ||
| static protected array<class-string, array<class-string, true>> | $traits | ||
| static protected CachedClassAttribute>> | $attributes | ||
| static protected array<class-string, array<class-string, array<int, bool>>> | $classAttributePresence | ||
| static protected array<class-string, array<string, array<class-string, bool>>> | $propertyAttributePresence |
Methods
Get the cached reflection class for the given class.
Get the cached reflection method for the given class and method.
Get the cached default properties for the given class.
Get the cached properties for the given class.
Get the cached properties for the given class, followed by the private properties its parents declare.
Determine if the class uses a trait directly, through another trait or through a parent.
Get the cached class attribute metadata for the given class.
Determine if the given class has the given attribute, optionally checking its parents.
Determine if the given property has the given concrete property attribute.
Resolve the class attribute metadata for the given class.
Get the class name for the given target.
Flush all static state.
Details
at line 68
static ReflectionClass
reflectClass(object|string $target)
Get the cached reflection class for the given class.
at line 82
static ReflectionMethod
reflectMethod(object|string $target, string $method)
Get the cached reflection method for the given class and method.
at line 98
static array
defaultProperties(object|string $target)
Get the cached default properties for the given class.
at line 114
static array
properties(object|string $target)
Get the cached properties for the given class.
at line 133
static array
allProperties(object|string $target)
Get the cached properties for the given class, followed by the private properties its parents declare.
Reflection omits a parent's private properties from the class's properties, though every instance of the class holds them.
at line 160
static bool
usesTrait(object|string $target, string $trait)
Determine if the class uses a trait directly, through another trait or through a parent.
at line 176
static CachedClassAttribute|null
getAttribute(object|string $target, string $attributeClass)
Get the cached class attribute metadata for the given class.
at line 199
static bool
hasClassAttribute(object|string $target, string $attributeClass, bool $ascend = false)
Determine if the given class has the given attribute, optionally checking its parents.
at line 225
static bool
hasPropertyAttribute(ReflectionProperty $property, string $attributeClass)
Determine if the given property has the given concrete property attribute.
at line 252
static protected array
resolveTraits(ReflectionClass $reflection)
Collect the traits used by a class and its parents.
at line 272
static protected CachedClassAttribute|null
resolveAttribute(string $class, string $attributeClass)
Resolve the class attribute metadata for the given class.
at line 309
static protected string
className(object|string $target)
Get the class name for the given target.
at line 317
static void
flushState()
Flush all static state.