Documentation

StaticReflectionService
in package
implements ReflectionService

PHP Runtime Reflection Service.

Table of Contents

Interfaces

ReflectionService
Very simple reflection service abstraction.

Methods

getAccessibleProperty()  : ReflectionProperty|null
Returns an accessible property (setAccessible(true)) or null.
getClass()  : null
Returns a reflection class instance or null.
getClassNamespace()  : string
getClassShortName()  : string
Returns the shortname of a class.
getParentClasses()  : array<string|int, string>
Returns an array of the parent classes (not interfaces) for the given class.
hasPublicMethod()  : bool
Checks if the class have a public method with the given name.

Methods

getAccessibleProperty()

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

public getAccessibleProperty(string $class, string $property) : ReflectionProperty|null
Parameters
$class : string
$property : string
Return values
ReflectionProperty|null

getClass()

Returns a reflection class instance or null.

public getClass(string $class) : null
Parameters
$class : string
Return values
null

getClassNamespace()

public getClassNamespace(string $class) : string
Parameters
$class : string
Return values
string

getClassShortName()

Returns the shortname of a class.

public getClassShortName(string $class) : string
Parameters
$class : string
Return values
string

getParentClasses()

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

public getParentClasses(string $class) : array<string|int, string>
Parameters
$class : string
Return values
array<string|int, string>

hasPublicMethod()

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

public hasPublicMethod(string $class, string $method) : bool
Parameters
$class : string
$method : string
Return values
bool

        
On this page

Search results