Documentation

ArgumentMetadataFactory
in package
implements ArgumentMetadataFactoryInterface

Builds {@see ArgumentMetadata} objects based on the given Controller.

Tags
author

Iltar van der Berg kjarli@gmail.com

Interfaces, Classes and Traits

ArgumentMetadataFactoryInterface
Builds method argument data.

Table of Contents

$supportsParameterType  : bool
If the reflection supports the getType() method to resolve types.
$supportsVariadic  : bool
If the ...$arg functionality is available.
__construct()  : mixed
createArgumentMetadata()  : array<string|int, ArgumentMetadata>
getDefaultValue()  : mixed|null
Returns a default value if available.
getType()  : string|null
Returns an associated type to the given parameter if available.
hasDefaultValue()  : bool
Determines whether an argument has a default value.
isVariadic()  : bool
Returns whether an argument is variadic.

Properties

$supportsParameterType

If the reflection supports the getType() method to resolve types.

private bool $supportsParameterType

Requires at least PHP 7.0.0 or HHVM 3.11.0

$supportsVariadic

If the ...$arg functionality is available.

private bool $supportsVariadic

Requires at least PHP 5.6.0 or HHVM 3.9.1

Methods

getDefaultValue()

Returns a default value if available.

private getDefaultValue(ReflectionParameter $parameter) : mixed|null
Parameters
$parameter : ReflectionParameter
Return values
mixed|null

getType()

Returns an associated type to the given parameter if available.

private getType(ReflectionParameter $parameter, ReflectionFunctionAbstract $function) : string|null
Parameters
$parameter : ReflectionParameter
$function : ReflectionFunctionAbstract
Return values
string|null

hasDefaultValue()

Determines whether an argument has a default value.

private hasDefaultValue(ReflectionParameter $parameter) : bool
Parameters
$parameter : ReflectionParameter
Return values
bool

isVariadic()

Returns whether an argument is variadic.

private isVariadic(ReflectionParameter $parameter) : bool
Parameters
$parameter : ReflectionParameter
Return values
bool

Search results