interface ReflectionService (View source)

Very simple reflection service abstraction.

This is required inside metadata layers that may require either static or runtime reflection.

Methods

array
getParentClasses(string $class)

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

string
getClassShortName(string $class)

Returns the shortname of a class.

string
getClassNamespace(string $class)

No description

getClass(string $class)

Returns a reflection class instance or null.

getAccessibleProperty(string $class, string $property)

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

bool
hasPublicMethod(mixed $class, mixed $method)

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

Details

array getParentClasses(string $class)

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

Parameters

string $class

Return Value

array

Exceptions

MappingException

string getClassShortName(string $class)

Returns 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)

Returns a reflection class instance or null.

Parameters

string $class

Return Value

ReflectionClass|null

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

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

Parameters

string $class
string $property

Return Value

ReflectionProperty|null

bool hasPublicMethod(mixed $class, mixed $method)

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

Parameters

mixed $class
mixed $method

Return Value

bool