class Reflection

PHP reflection helpers.

Traits

Static class.

Constants

BUILTIN_TYPES

Methods

static bool
isBuiltinType(string $type)

No description

static string|null
static string|null
getParameterType(ReflectionParameter $param)

No description

static string|null
getPropertyType(ReflectionProperty $prop)

No description

static mixed
static ReflectionClass
getPropertyDeclaringClass(ReflectionProperty $prop)

Returns declaring class or trait.

static bool
areCommentsAvailable()

Are documentation comments available?

static string
toString(Reflector $ref)

No description

static string
expandClassName(string $name, ReflectionClass $rc)

Expands class name into full name.

static array
getUseStatements(ReflectionClass $class)

No description

Details

at line 28
static bool isBuiltinType(string $type)

Parameters

string $type

Return Value

bool

at line 34
static string|null getReturnType(ReflectionFunctionAbstract $func)

Parameters

ReflectionFunctionAbstract $func

Return Value

string|null

at line 42
static string|null getParameterType(ReflectionParameter $param)

Parameters

ReflectionParameter $param

Return Value

string|null

at line 50
static string|null getPropertyType(ReflectionProperty $prop)

Parameters

ReflectionProperty $prop

Return Value

string|null

at line 75
static mixed getParameterDefaultValue(ReflectionParameter $param)

Parameters

ReflectionParameter $param

Return Value

mixed

Exceptions

ReflectionException when default value is not available or resolvable

at line 108
static ReflectionClass getPropertyDeclaringClass(ReflectionProperty $prop)

Returns declaring class or trait.

Parameters

ReflectionProperty $prop

Return Value

ReflectionClass

at line 124
static bool areCommentsAvailable()

Are documentation comments available?

Return Value

bool

at line 133
static string toString(Reflector $ref)

Parameters

Reflector $ref

Return Value

string

at line 155
static string expandClassName(string $name, ReflectionClass $rc)

Expands class name into full name.

Parameters

string $name
ReflectionClass $rc

Return Value

string

Exceptions

InvalidArgumentException

at line 189
static array getUseStatements(ReflectionClass $class)

Parameters

ReflectionClass $class

Return Value

array of [alias => class]