Method |
Description |
|
__clone ( ) |
|
|
__toString ( ) : string |
Return string representation of this parameter. |
|
allowsNull ( ) : boolean |
Does this method allow null for a parameter? |
|
canBePassedByValue ( ) : boolean |
|
|
createFromClassInstanceAndMethod ( object $instance, string $methodName, string $parameterName ) : ReflectionParameter |
Create a reflection of a parameter using an instance |
|
createFromClassNameAndMethod ( string $className, string $methodName, string $parameterName ) : ReflectionParameter |
Create a reflection of a parameter using a class name |
|
createFromNode ( BetterReflection\Reflector\Reflector $reflector, Param $node, ReflectionFunctionAbstract $function, integer $parameterIndex ) : ReflectionParameter |
|
|
createFromSpec ( string[] | string | Closure $spec, string $parameterName ) : ReflectionParameter |
Create the parameter from the given spec. Possible $spec parameters are: |
|
export ( ) |
|
|
getClass ( ) : ReflectionClass | null |
Gets a ReflectionClass for the type hint (returns null if not a class) |
|
getDeclaringClass ( ) : ReflectionClass | null |
Get the class from the method that this parameter belongs to, if it
exists. |
|
getDeclaringFunction ( ) : ReflectionFunctionAbstract |
Get the function (or method) that declared this parameter. |
|
getDefaultValue ( ) : mixed |
Get the default value of the parameter. |
|
getDefaultValueAsString ( ) : string |
Get the default value represented as a string. |
|
getDefaultValueConstantName ( ) : string |
|
|
getDocBlockTypeStrings ( ) : string[] |
Get the DocBlock type hints as an array of strings. |
|
getDocBlockTypes ( ) : phpDocumentor\Reflection\Type[] |
Get the types defined in the DocBlocks. This returns an array because
the parameter may have multiple (compound) types specified (for example
when you type hint pipe-separated "string|null", in which case this
would return an array of Type objects, one for string, one for null. |
|
getName ( ) : string |
Get the name of the parameter. |
|
getPosition ( ) : integer |
Find the position of the parameter, left to right, starting at zero. |
|
getType ( ) : ReflectionType | null |
Get the ReflectionType instance representing the type declaration for
this parameter |
|
getTypeHint ( ) : phpDocumentor\Reflection\Type |
Get the type hint declared for the parameter. This is the real type hint
for the parameter, e.g. method(closure $someFunc) defined by the
method itself, and is separate from the DocBlock type hints. |
|
hasType ( ) : boolean |
Does this parameter have a type declaration? |
|
isArray ( ) : boolean |
Is this parameter an array? |
|
isCallable ( ) : boolean |
Is this parameter a callable? |
|
isDefaultValueAvailable ( ) : boolean |
Does the parameter have a default, regardless of whether it is optional. |
|
isDefaultValueConstant ( ) : boolean |
|
|
isOptional ( ) : boolean |
Is the parameter optional? |
|
isPassedByReference ( ) : boolean |
Is this parameter passed by reference (denoted by &$param). |
|
isVariadic ( ) : boolean |
Is this parameter a variadic (denoted by . |
|
removeType ( ) |
Remove the parameter type declaration completely. |
|
setType ( phpDocumentor\Reflection\Type $newParameterType ) |
Set the parameter type declaration. |
|