class RuntimeReflectionService implements ReflectionService (View source)

PHP Runtime Reflection Service

Methods

array
getParentClasses(string $class)

Return an array of the parent classes (not interfaces) for the given class.

string
getClassShortName(string $class)

Return the shortname of a class.

string
getClassNamespace(string $class)

No description

ReflectionClass|null
getClass(string $class)

Return a reflection class instance or null

ReflectionProperty|null
getAccessibleProperty(string $class, string $property)

Return an accessible property (setAccessible(true)) or null.

bool
hasPublicMethod(mixed $class, mixed $method)

Check if the class have a public method with the given name.

Details

array getParentClasses(string $class)

Return an array of the parent classes (not interfaces) for the given class.

Parameters

string $class

Return Value

array

string getClassShortName(string $class)

Return the shortname of a class.

Parameters

string $class

Return Value

string

string getClassNamespace(string $class)

Parameters

string $class

Return Value

string

ReflectionClass|null getClass(string $class)

Return a reflection class instance or null

Parameters

string $class

Return Value

ReflectionClass|null

ReflectionProperty|null getAccessibleProperty(string $class, string $property)

Return an accessible property (setAccessible(true)) or null.

Parameters

string $class
string $property

Return Value

ReflectionProperty|null

bool hasPublicMethod(mixed $class, mixed $method)

Check if the class have a public method with the given name.

Parameters

mixed $class
mixed $method

Return Value

bool