class ComponentReflection extends ReflectionClass

Helpers for Presenter & Component.

Traits

Strict class for better experience.

Methods

array
getPersistentParams(string $class = null)

Returns array of classes persistent parameters. They have public visibility, are non-static and have annotation @persistent.

array
getPersistentComponents(string $class = null)

No description

void
saveState(Component $component, array $params)

Saves state informations for next request.

bool
hasCallableMethod(string $method)

Is a method callable? It means class is instantiable and method has public visibility, is non-static and non-abstract.

static array
combineArgs(ReflectionFunctionAbstract $method, array $args)

No description

static bool
convertType($val, string $type, bool $isClass = false)

Non data-loss type conversion.

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

Returns an annotation value.

static array
getParameterType(ReflectionParameter $param)

No description

bool
hasAnnotation(string $name)

Has class specified annotation?

mixed
getAnnotation(string $name)

Returns an annotation value.

getMethod($name)

No description

array
getMethods($filter = -1)

No description

static array
getClassesAndTraits(string $class)

return string[]

Details

at line 39
array getPersistentParams(string $class = null)

Returns array of classes persistent parameters. They have public visibility, are non-static and have annotation @persistent.

Parameters

string $class

Return Value

array

at line 71
array getPersistentComponents(string $class = null)

Parameters

string $class

Return Value

array

at line 95
void saveState(Component $component, array $params)

Saves state informations for next request.

Parameters

Component $component
array $params

Return Value

void

at line 136
bool hasCallableMethod(string $method)

Is a method callable? It means class is instantiable and method has public visibility, is non-static and non-abstract.

Parameters

string $method

Return Value

bool

at line 152
static array combineArgs(ReflectionFunctionAbstract $method, array $args)

Parameters

ReflectionFunctionAbstract $method
array $args

Return Value

array

at line 190
static bool convertType($val, string $type, bool $isClass = false)

Non data-loss type conversion.

Parameters

$val
string $type
bool $isClass

Return Value

bool

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

Returns an annotation value.

Parameters

Reflector $ref
string $name

Return Value

array|null

at line 246
static array getParameterType(ReflectionParameter $param)

Parameters

ReflectionParameter $param

Return Value

array [string|null, bool]

at line 257
bool hasAnnotation(string $name)

Has class specified annotation?

Parameters

string $name

Return Value

bool

at line 267
mixed getAnnotation(string $name)

Returns an annotation value.

Parameters

string $name

Return Value

mixed

at line 274
MethodReflection getMethod($name)

Parameters

$name

Return Value

MethodReflection

at line 283
array getMethods($filter = -1)

Parameters

$filter

Return Value

array

at line 295
static array getClassesAndTraits(string $class)

return string[]

Parameters

string $class

Return Value

array