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 CachedClassAttribute>> $attributes
static protected array<class-string, array<class-string, bool>> $classAttributePresence
static protected array<class-string, array<string, array<class-string, bool>>> $propertyAttributePresence

Methods

static ReflectionClass
reflectClass(object|string $target)

Get the cached reflection class for the given class.

reflectMethod(object|string $target, string $method)

Get the cached reflection method for the given class and method.

static array
defaultProperties(object|string $target)

Get the cached default properties for the given class.

static array
properties(object|string $target)

Get the cached properties for the given class.

static CachedClassAttribute|null
getAttribute(object|string $target, string $attributeClass)

Get the cached class attribute metadata for the given class.

static bool
hasClassAttribute(object|string $target, string $attributeClass)

Determine if the given class has the given concrete class attribute.

static bool
hasPropertyAttribute(ReflectionProperty $property, string $attributeClass)

Determine if the given property has the given concrete property attribute.

static CachedClassAttribute|null
resolveAttribute(string $class, string $attributeClass)

Resolve the class attribute metadata for the given class.

static string
className(object|string $target)

Get the class name for the given target.

static void
flushState()

Flush all static state.

Details

at line 58
static ReflectionClass reflectClass(object|string $target)

Get the cached reflection class for the given class.

Parameters

object|string $target

Return Value

ReflectionClass

Exceptions

ReflectionException

at line 72
static ReflectionMethod reflectMethod(object|string $target, string $method)

Get the cached reflection method for the given class and method.

Parameters

object|string $target
string $method

Return Value

ReflectionMethod

Exceptions

ReflectionException

at line 88
static array defaultProperties(object|string $target)

Get the cached default properties for the given class.

Parameters

object|string $target

Return Value

array

Exceptions

ReflectionException

at line 104
static array properties(object|string $target)

Get the cached properties for the given class.

Parameters

object|string $target

Return Value

array

Exceptions

ReflectionException

at line 120
static CachedClassAttribute|null getAttribute(object|string $target, string $attributeClass)

Get the cached class attribute metadata for the given class.

Parameters

object|string $target
string $attributeClass

Return Value

CachedClassAttribute|null

Exceptions

ReflectionException

at line 143
static bool hasClassAttribute(object|string $target, string $attributeClass)

Determine if the given class has the given concrete class attribute.

Parameters

object|string $target
string $attributeClass

Return Value

bool

Exceptions

ReflectionException

at line 164
static bool hasPropertyAttribute(ReflectionProperty $property, string $attributeClass)

Determine if the given property has the given concrete property attribute.

Parameters

ReflectionProperty $property
string $attributeClass

Return Value

bool

at line 191
static protected CachedClassAttribute|null resolveAttribute(string $class, string $attributeClass)

Resolve the class attribute metadata for the given class.

Parameters

string $class
string $attributeClass

Return Value

CachedClassAttribute|null

at line 228
static protected string className(object|string $target)

Get the class name for the given target.

Parameters

object|string $target

Return Value

string

at line 236
static void flushState()

Flush all static state.

Return Value

void