class PhpReflection

deprecated

internal  
 

PHP reflection helpers.

Methods

static string|null
parseAnnotation(Reflector $ref, $name)

Returns an annotation value.

static ReflectionClass
getDeclaringClass(ReflectionProperty $prop)

Returns declaring class or trait.

static string|null
getParameterType(ReflectionParameter $param)

No description

static string|null
static bool
isBuiltinType($type)

No description

static string[]
getClassTree(ReflectionClass $class)

Returns class and all its descendants.

static string
expandClassName($name, ReflectionClass $rc)

Expands class name into full name.

static array
getUseStatements(ReflectionClass $class)

No description

static array
parseUseStatements($code, $forClass = null)

Parses PHP code.

Details

at line 26
static string|null parseAnnotation(Reflector $ref, $name)

Returns an annotation value.

Parameters

Reflector $ref
$name

Return Value

string|null

at line 46
static ReflectionClass getDeclaringClass(ReflectionProperty $prop)

Returns declaring class or trait.

Parameters

ReflectionProperty $prop

Return Value

ReflectionClass

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

No description

Parameters

ReflectionParameter $param

Return Value

string|null

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

No description

Parameters

ReflectionFunctionAbstract $func

Return Value

string|null

at line 102
static bool isBuiltinType($type)

No description

Parameters

$type

Return Value

bool

at line 112
static string[] getClassTree(ReflectionClass $class)

Returns class and all its descendants.

Parameters

ReflectionClass $class

Return Value

string[]

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

Expands class name into full name.

Parameters

$name
ReflectionClass $rc

Return Value

string

full name

Exceptions

InvalidArgumentException

at line 165
static array getUseStatements(ReflectionClass $class)

No description

Parameters

ReflectionClass $class

Return Value

array

of [alias => class]

at line 185
static array parseUseStatements($code, $forClass = null)

Parses PHP code.

Parameters

$code
$forClass

Return Value

array

of [class => [alias => class, ...]]

Traits

StaticClass