Very simple reflection service abstraction.
This is required inside metadata layers that may require either static or runtime reflection.
@author Benjamin Eberlei <kontakt@beberlei.de>
Expanded class hierarchy of ReflectionService
All classes that implement ReflectionService
interface ReflectionService {
/**
* Return an array of the parent classes (not interfaces) for the given class.
*
* @param string $class
* @return array
*/
function getParentClasses($class);
/**
* Return the shortname of a class.
*
* @param string $class
* @return string
*/
function getClassShortName($class);
/**
* @param string $class
* @return string
*/
function getClassNamespace($class);
/**
* Return a reflection class instance or null
*
* @param string $class
* @return \ReflectionClass|null
*/
function getClass($class);
/**
* Return an accessible property (setAccessible(true)) or null.
*
* @param string $class
* @param string $property
* @return \ReflectionProperty|null
*/
function getAccessibleProperty($class, $property);
/**
* Check if the class have a public method with the given name.
*
* @param mixed $class
* @param mixed $method
* @return bool
*/
function hasPublicMethod($class, $method);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ReflectionService:: |
function | Return an accessible property (setAccessible(true)) or null. | 2 | |
ReflectionService:: |
function | Return a reflection class instance or null | 2 | |
ReflectionService:: |
function | 2 | ||
ReflectionService:: |
function | Return the shortname of a class. | 2 | |
ReflectionService:: |
function | Return an array of the parent classes (not interfaces) for the given class. | 2 | |
ReflectionService:: |
function | Check if the class have a public method with the given name. | 2 |