Overview

Namespaces

  • TokenReflection
    • Broker
      • Backend
    • Dummy
    • Exception
    • Invalid
    • Php
    • Stream

Classes

  • Broker
  • ReflectionAnnotation
  • ReflectionBase
  • ReflectionClass
  • ReflectionConstant
  • ReflectionElement
  • ReflectionFile
  • ReflectionFileNamespace
  • ReflectionFunction
  • ReflectionFunctionBase
  • ReflectionMethod
  • ReflectionNamespace
  • ReflectionParameter
  • ReflectionProperty
  • Resolver

Interfaces

  • IReflection
  • IReflectionClass
  • IReflectionConstant
  • IReflectionExtension
  • IReflectionFunction
  • IReflectionFunctionBase
  • IReflectionMethod
  • IReflectionNamespace
  • IReflectionParameter
  • IReflectionProperty
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class ReflectionParameter

Tokenized function/method parameter reflection.

TokenReflection\ReflectionBase implements TokenReflection\IReflection
Extended by TokenReflection\ReflectionElement
Extended by TokenReflection\ReflectionParameter implements TokenReflection\IReflectionParameter
Namespace: TokenReflection
Located at ReflectionParameter.php
Methods summary
public TokenReflection\ReflectionClass|null
# getDeclaringClass( )

Returns the declaring class.

Returns the declaring class.

Returns

TokenReflection\ReflectionClass|null

Implementation of

TokenReflection\IReflectionParameter::getDeclaringClass()
public string|null
# getDeclaringClassName( )

Returns the declaring class name.

Returns the declaring class name.

Returns

string|null

Implementation of

TokenReflection\IReflectionParameter::getDeclaringClassName()
public TokenReflection\ReflectionFunctionBase
# getDeclaringFunction( )

Returns the declaring function.

Returns the declaring function.

Returns

TokenReflection\ReflectionFunctionBase

Implementation of

TokenReflection\IReflectionParameter::getDeclaringFunction()
public string
# getDeclaringFunctionName( )

Returns the declaring function name.

Returns the declaring function name.

Returns

string

Implementation of

TokenReflection\IReflectionParameter::getDeclaringFunctionName()
public mixed
# getDefaultValue( )

Returns the default value.

Returns the default value.

Returns

mixed

Throws

TokenReflection\Exception\RuntimeException
If the property is not optional.
TokenReflection\Exception\RuntimeException
If the property has no default value.

Implementation of

TokenReflection\IReflectionParameter::getDefaultValue()
public string
# getDefaultValueDefinition( )

Returns the part of the source code defining the parameter default value.

Returns the part of the source code defining the parameter default value.

Returns

string

Implementation of

TokenReflection\IReflectionParameter::getDefaultValueDefinition()
public boolean
# isDefaultValueAvailable( )

Retutns if a default value for the parameter is available.

Retutns if a default value for the parameter is available.

Returns

boolean

Implementation of

TokenReflection\IReflectionParameter::isDefaultValueAvailable()
public integer
# getPosition( )

Returns the position within all parameters.

Returns the position within all parameters.

Returns

integer

Implementation of

TokenReflection\IReflectionParameter::getPosition()
public boolean
# isArray( )

Returns if the parameter expects an array.

Returns if the parameter expects an array.

Returns

boolean

Implementation of

TokenReflection\IReflectionParameter::isArray()
public boolean
# isCallable( )

Returns if the parameter expects a callback.

Returns if the parameter expects a callback.

Returns

boolean
public string|null
# getOriginalTypeHint( )

Returns the original type hint as defined in the source code.

Returns the original type hint as defined in the source code.

Returns

string|null
public TokenReflection\IReflectionClass|null
# getClass( )

Returns reflection of the required class of the value.

Returns reflection of the required class of the value.

Returns

TokenReflection\IReflectionClass|null

Implementation of

TokenReflection\IReflectionParameter::getClass()
public string|null
# getClassName( )

Returns the required class name of the value.

Returns the required class name of the value.

Returns

string|null

Throws

TokenReflection\Exception\RuntimeException
If the type hint class FQN could not be determined.

Implementation of

TokenReflection\IReflectionParameter::getClassName()
public boolean
# allowsNull( )

Returns if the the parameter allows NULL.

Returns if the the parameter allows NULL.

Returns

boolean

Implementation of

TokenReflection\IReflectionParameter::allowsNull()
public boolean
# isOptional( )

Returns if the parameter is optional.

Returns if the parameter is optional.

Returns

boolean

Throws

TokenReflection\Exception\RuntimeException
If it is not possible to determine if the parameter is optional.

Implementation of

TokenReflection\IReflectionParameter::isOptional()
public boolean
# isPassedByReference( )

Returns if the parameter value is passed by reference.

Returns if the parameter value is passed by reference.

Returns

boolean

Implementation of

TokenReflection\IReflectionParameter::isPassedByReference()
public boolean
# canBePassedByValue( )

Returns if the paramter value can be passed by value.

Returns if the paramter value can be passed by value.

Returns

boolean

Implementation of

TokenReflection\IReflectionParameter::canBePassedByValue()
public string
# getPrettyName( )

Returns an element pretty (docblock compatible) name.

Returns an element pretty (docblock compatible) name.

Returns

string

Overrides

TokenReflection\ReflectionBase::getPrettyName()

Implementation of

TokenReflection\IReflection::getPrettyName()
public string
# __toString( )

Returns the string representation of the reflection object.

Returns the string representation of the reflection object.

Returns

string

Implementation of

TokenReflection\IReflectionParameter::__toString()
public static string|null
# export( TokenReflection\Broker $broker, string $function, string $parameter, boolean $return = false )

Exports a reflected object.

Exports a reflected object.

Parameters

$broker
TokenReflection\Broker
$broker Broker instance
$function
string
$function Function name
$parameter
string
$parameter Parameter name
$return
boolean
$return Return the export instead of outputting it

Returns

string|null

Throws

TokenReflection\Exception\RuntimeException
If requested parameter doesn't exist.
public array
# getNamespaceAliases( )

Returns imported namespaces and aliases from the declaring namespace.

Returns imported namespaces and aliases from the declaring namespace.

Returns

array
public TokenReflection\ReflectionParameter
# alias( TokenReflection\ReflectionMethod $parent )

Creates a parameter alias for the given method.

Creates a parameter alias for the given method.

Parameters

$parent
TokenReflection\ReflectionMethod
$parent New parent method

Returns

TokenReflection\ReflectionParameter
protected TokenReflection\ReflectionElement
# processParent( TokenReflection\IReflection $parent, TokenReflection\Stream\StreamBase $tokenStream )

Processes the parent reflection object.

Processes the parent reflection object.

Parameters

$parent
TokenReflection\IReflection
$parent Parent reflection object
$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionElement

Throws

TokenReflection\Exception\ParseException
If an invalid parent reflection object was provided.

Overrides

TokenReflection\ReflectionElement::processParent()
protected TokenReflection\ReflectionParameter
# parse( TokenReflection\Stream\StreamBase $tokenStream, TokenReflection\IReflection $parent )

Parses reflected element metadata from the token stream.

Parses reflected element metadata from the token stream.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream
$parent
TokenReflection\IReflection
$parent Parent reflection object

Returns

TokenReflection\ReflectionParameter
protected TokenReflection\ReflectionParameter
# parseName( TokenReflection\Stream\StreamBase $tokenStream )

Parses the constant name.

Parses the constant name.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionParameter

Throws

TokenReflection\Exception\ParseException
If the parameter name could not be determined.
Methods inherited from TokenReflection\ReflectionElement
__construct(), getDocblockTemplates(), getEndLine(), getEndPosition(), getExtension(), getExtensionName(), getFileName(), getFileReflection(), getSource(), getStartLine(), getStartPosition(), parseChildren(), parseDocComment(), parseStream()
Methods inherited from TokenReflection\ReflectionBase
__get(), __isset(), exists(), get(), getAnnotation(), getAnnotations(), getBroker(), getDocComment(), getName(), hasAnnotation(), isDeprecated(), isInternal(), isTokenized(), isUserDefined()
Constants summary
string ARRAY_TYPE_HINT 'array'
#

The parameter requires an array as its value.

The parameter requires an array as its value.

string CALLABLE_TYPE_HINT 'callable'
#

The parameter requires a callback definition as its value.

The parameter requires a callback definition as its value.

Constants inherited from TokenReflection\ReflectionElement
DOCBLOCK_TEMPLATE_END, DOCBLOCK_TEMPLATE_START
Properties inherited from TokenReflection\ReflectionElement
$docblockTemplates, $startPosition
Properties inherited from TokenReflection\ReflectionBase
$docComment, $name
PHP Token Reflection API documentation generated by ApiGen 2.8.0