ReflectionPropertiesGetter
in package
FinalYes
Utility class to retrieve all reflection instance properties of a given class, including private inherited properties and transient properties.
Tags
Table of Contents
Properties
- $properties : array<string|int, array<string|int, ReflectionProperty>>
- $reflectionService : ReflectionService
Methods
- __construct() : mixed
- getProperties() : array<string|int, ReflectionProperty>
- getAccessibleProperty() : ReflectionProperty|null
- getClassProperties() : array<string|int, ReflectionProperty>
- getHierarchyClasses() : array<string|int, ReflectionClass>
- getLogicalName() : string
- isInstanceProperty() : bool
Properties
$properties
private
array<string|int, array<string|int, ReflectionProperty>>
$properties
= []
indexed by class name and property internal name
$reflectionService
private
ReflectionService
$reflectionService
Methods
__construct()
public
__construct(ReflectionService $reflectionService) : mixed
Parameters
- $reflectionService : ReflectionService
getProperties()
public
getProperties(string $className) : array<string|int, ReflectionProperty>
Parameters
- $className : string
Tags
Return values
array<string|int, ReflectionProperty> —indexed by property internal name
getAccessibleProperty()
private
getAccessibleProperty(ReflectionProperty $property) : ReflectionProperty|null
Parameters
- $property : ReflectionProperty
Return values
ReflectionProperty|nullgetClassProperties()
private
getClassProperties(ReflectionClass $reflectionClass) : array<string|int, ReflectionProperty>
Parameters
- $reflectionClass : ReflectionClass
Tags
Return values
array<string|int, ReflectionProperty>getHierarchyClasses()
private
getHierarchyClasses(string $className) : array<string|int, ReflectionClass>
Parameters
- $className : string
Tags
Return values
array<string|int, ReflectionClass>getLogicalName()
private
getLogicalName(ReflectionProperty $property) : string
Parameters
- $property : ReflectionProperty
Return values
stringisInstanceProperty()
private
isInstanceProperty(ReflectionProperty $reflectionProperty) : bool
Parameters
- $reflectionProperty : ReflectionProperty