class StaticReflectionService implements ReflectionService (View source)

PHP Runtime Reflection Service.

Methods

string[]
getParentClasses(string $class)

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

string
getClassShortName($className)

Returns the shortname of a class.

string
getClassNamespace($className)

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

string[] getParentClasses(string $class)

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

Parameters

string $class

Return Value

string[]

Exceptions

MappingException

string getClassShortName($className)

Returns the shortname of a class.

Parameters

$className

Return Value

string

string getClassNamespace($className)

Parameters

$className

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