Overview

Namespaces

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

Classes

  • ReflectionClass
  • ReflectionConstant
  • ReflectionExtension
  • ReflectionFunction
  • ReflectionMethod
  • ReflectionParameter
  • ReflectionProperty

Interfaces

  • IReflection
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class ReflectionFunction

Reflection of a not tokenized but defined function.

Descendant of the internal reflection with additional features.

ReflectionFunctionAbstract implements Reflector
Extended by ReflectionFunction
Extended by TokenReflection\Php\ReflectionFunction implements TokenReflection\Php\IReflection, TokenReflection\IReflectionFunction
Namespace: TokenReflection\Php
Located at Php/ReflectionFunction.php
Methods summary
public
# __construct( string $functionName, TokenReflection\Broker $broker )

Constructor.

Constructor.

Parameters

$functionName
string
$functionName Function name
$broker
TokenReflection\Broker
$broker Reflection broker

Overrides

ReflectionFunction::__construct()
public TokenReflection\IReflectionExtension
# getExtension( )

Returns the PHP extension reflection.

Returns the PHP extension reflection.

Returns

TokenReflection\IReflectionExtension

Overrides

ReflectionFunctionAbstract::getExtension()

Implementation of

TokenReflection\IReflectionFunctionBase::getExtension()
public boolean
# hasAnnotation( string $name )

Checks if there is a particular annotation.

Checks if there is a particular annotation.

Parameters

$name
string
$name Annotation name

Returns

boolean
public null
# getAnnotation( string $name )

Returns a particular annotation value.

Returns a particular annotation value.

Parameters

$name
string
$name Annotation name

Returns

null
public array
# getAnnotations( )

Returns parsed docblock.

Returns parsed docblock.

Returns

array
public boolean
# isTokenized( )

Returns if the current reflection comes from a tokenized source.

Returns if the current reflection comes from a tokenized source.

Returns

boolean

Implementation of

TokenReflection\IReflection::isTokenized()
public TokenReflection\Php\ReflectionParameter
# getParameter( integer|string $parameter )

Returns a particular parameter.

Returns a particular parameter.

Parameters

$parameter
integer|string
$parameter Parameter name or position

Returns

TokenReflection\Php\ReflectionParameter

Throws

TokenReflection\Exception\RuntimeException
If there is no parameter of the given name.
TokenReflection\Exception\RuntimeException
If there is no parameter at the given position.

Implementation of

TokenReflection\IReflectionFunctionBase::getParameter()
public array
# getParameters( )

Returns function parameters.

Returns function parameters.

Returns

array

Overrides

ReflectionFunctionAbstract::getParameters()

Implementation of

TokenReflection\IReflectionFunctionBase::getParameters()
public TokenReflection\Broker
# getBroker( )

Returns the reflection broker used by this reflection object.

Returns the reflection broker used by this reflection object.

Returns

TokenReflection\Broker

Implementation of

TokenReflection\IReflection::getBroker()
public array
# getNamespaceAliases( )

Returns imported namespaces and aliases from the declaring namespace.

Returns imported namespaces and aliases from the declaring namespace.

Returns

array

Implementation of

TokenReflection\IReflectionFunction::getNamespaceAliases()
final public mixed
# __get( string $key )

Magic __get method.

Magic __get method.

Parameters

$key
string
$key Variable name

Returns

mixed

Implementation of

TokenReflection\IReflection::__get()
final public boolean
# __isset( string $key )

Magic __isset method.

Magic __isset method.

Parameters

$key
string
$key Variable name

Returns

boolean

Implementation of

TokenReflection\IReflection::__isset()
public Closure
# getClosure( )

Returns the function/method as closure.

Returns the function/method as closure.

Returns

Closure

Implementation of

TokenReflection\IReflectionFunction::getClosure()
public string|null
# getClosureScopeClass( )

Returns the closure scope class.

Returns the closure scope class.

Returns

string|null
public null
# getClosureThis( )

Returns this pointer bound to closure.

Returns this pointer bound to closure.

Returns

null
public boolean
# isValid( )

Returns if the function definition is valid.

Returns if the function definition is valid.

Internal functions are always valid.

Returns

boolean

Implementation of

TokenReflection\IReflectionFunction::isValid()
public string
# getPrettyName( )

Returns an element pretty (docblock compatible) name.

Returns an element pretty (docblock compatible) name.

Returns

string

Implementation of

TokenReflection\IReflection::getPrettyName()
public static TokenReflection\Php\ReflectionFunction
# create( Reflector $internalReflection, TokenReflection\Broker $broker )

Creates a reflection instance.

Creates a reflection instance.

Parameters

$internalReflection
ReflectionClass
$internalReflection Internal reflection instance
$broker
TokenReflection\Broker
$broker Reflection broker instance

Returns

TokenReflection\Php\ReflectionFunction

Throws

TokenReflection\Exception\RuntimeException
If an invalid internal reflection object was provided.

Implementation of

TokenReflection\Php\IReflection::create()
Methods inherited from ReflectionFunction
__toString(), export(), invoke(), invokeArgs(), isDisabled()
Methods inherited from ReflectionFunctionAbstract
getDocComment(), getEndLine(), getExtensionName(), getFileName(), getName(), getNamespaceName(), getNumberOfParameters(), getNumberOfRequiredParameters(), getShortName(), getStartLine(), getStaticVariables(), inNamespace(), isClosure(), isDeprecated(), isInternal(), isUserDefined(), returnsReference()
Constants inherited from ReflectionFunction
IS_DEPRECATED
Properties inherited from ReflectionFunction
$name
PHP Token Reflection API documentation generated by ApiGen 2.8.0