mediatekformation

RuntimeReflectionService
in package
implements ReflectionService

PHP Runtime Reflection Service.

Interfaces, Classes, Traits and Enums

ReflectionService
Very simple reflection service abstraction.

Table of Contents

$supportsTypedPropertiesWorkaround  : bool
__construct()  : mixed
getAccessibleProperty()  : ReflectionProperty|null
Returns an accessible property (setAccessible(true)) or null.
getClass()  : ReflectionClass
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.

Properties

Methods

getAccessibleProperty()

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

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

getClass()

Returns a reflection class instance or null.

public getClass(string $class) : ReflectionClass
Parameters
$class : string
Tags
psalm-param

class-string<T> $class

psalm-return

ReflectionClass<T>

template

T of object

Return values
ReflectionClass

getClassNamespace()

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

getClassShortName()

Returns the shortname of a class.

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

getParentClasses()

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

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

hasPublicMethod()

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

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

Search results