class StaticReflectionService implements ReflectionService (View source)

PHP Runtime Reflection Service.

Methods

string[]
getParentClasses(string $className)

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

getClassShortName(string $className)

Returns the shortname of a class.

getClassNamespace(string $className)

No description

getClass(string $className)

Returns a reflection class instance or null.

getAccessibleProperty(string $className, string $propertyName)

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

hasPublicMethod(string $className, string $methodName)

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

Details

string[] getParentClasses(string $className)

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

Parameters

string $className

Return Value

string[]

Exceptions

InvalidArgumentException If provided argument is not a valid class name.

getClassShortName(string $className)

Returns the shortname of a class.

Parameters

string $className

getClassNamespace(string $className)

Parameters

string $className

getClass(string $className)

Returns a reflection class instance or null.

Parameters

string $className

getAccessibleProperty(string $className, string $propertyName)

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

Parameters

string $className
string $propertyName

hasPublicMethod(string $className, string $methodName)

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

Parameters

string $className
string $methodName