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 ReflectionFunctionBase

Base abstract class for tokenized function and method.

TokenReflection\ReflectionBase implements TokenReflection\IReflection
Extended by TokenReflection\ReflectionElement
Extended by TokenReflection\ReflectionFunctionBase implements TokenReflection\IReflectionFunctionBase

Direct known subclasses

TokenReflection\ReflectionFunction, TokenReflection\ReflectionMethod
Abstract
Namespace: TokenReflection
Located at ReflectionFunctionBase.php
Methods summary
public string
# getName( )

Returns the name (FQN).

Returns the name (FQN).

Returns

string

Overrides

TokenReflection\ReflectionBase::getName()

Implementation of

TokenReflection\IReflection::getName()
public string
# getShortName( )

Returns the unqualified name (UQN).

Returns the unqualified name (UQN).

Returns

string
public string
# getNamespaceName( )

Returns the namespace name.

Returns the namespace name.

Returns

string

Implementation of

TokenReflection\IReflectionFunctionBase::getNamespaceName()
public boolean
# inNamespace( )

Returns if the function/method is defined within a namespace.

Returns if the function/method is defined within a namespace.

Returns

boolean

Implementation of

TokenReflection\IReflectionFunctionBase::inNamespace()
public boolean
# isClosure( )

Returns if the function/method is a closure.

Returns if the function/method is a closure.

Returns

boolean

Implementation of

TokenReflection\IReflectionFunctionBase::isClosure()
public null
# getClosureThis( )

Returns this pointer bound to closure.

Returns this pointer bound to closure.

Returns

null
public string|null
# getClosureScopeClass( )

Returns the closure scope class.

Returns the closure scope class.

Returns

string|null
public boolean
# returnsReference( )

Returns if the function/method returns its value as reference.

Returns if the function/method returns its value as reference.

Returns

boolean

Implementation of

TokenReflection\IReflectionFunctionBase::returnsReference()
public TokenReflection\ReflectionParameter
# getParameter( integer|string $parameter )

Returns a particular function/method parameter.

Returns a particular function/method parameter.

Parameters

$parameter
integer|string
$parameter Parameter name or position

Returns

TokenReflection\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 parameters.

Returns parameters.

Returns

array

Implementation of

TokenReflection\IReflectionFunctionBase::getParameters()
public integer
# getNumberOfParameters( )

Returns the number of parameters.

Returns the number of parameters.

Returns

integer

Implementation of

TokenReflection\IReflectionFunctionBase::getNumberOfParameters()
public integer
# getNumberOfRequiredParameters( )

Returns the number of required parameters.

Returns the number of required parameters.

Returns

integer

Implementation of

TokenReflection\IReflectionFunctionBase::getNumberOfRequiredParameters()
public array
# getStaticVariables( )

Returns static variables.

Returns static variables.

Returns

array

Implementation of

TokenReflection\IReflectionFunctionBase::getStaticVariables()
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()
final protected
# aliasParameters( )

Creates aliases to parameters.

Creates aliases to parameters.

Throws

TokenReflection\Exception\RuntimeException
When called on a ReflectionFunction instance.
final protected TokenReflection\ReflectionFunctionBase
# parseReturnsReference( TokenReflection\Stream\StreamBase $tokenStream )

Parses if the function/method returns its value as reference.

Parses if the function/method returns its value as reference.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionFunctionBase

Throws

TokenReflection\Exception\ParseException
If could not be determined if the function\method returns its value by reference.
final protected TokenReflection\ReflectionMethod
# parseName( TokenReflection\Stream\StreamBase $tokenStream )

Parses the function/method name.

Parses the function/method name.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionMethod

Throws

TokenReflection\Exception\ParseException
If the class name could not be determined.
final protected TokenReflection\ReflectionElement
# parseChildren( TokenReflection\Stream\StreamBase $tokenStream, TokenReflection\IReflection $parent )

Parses child reflection objects from the token stream.

Parses child reflection objects from the token stream.

Parameters

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

Returns

TokenReflection\ReflectionElement

Overrides

TokenReflection\ReflectionElement::parseChildren()
final protected TokenReflection\ReflectionFunctionBase
# parseParameters( TokenReflection\Stream\StreamBase $tokenStream )

Parses function/method parameters.

Parses function/method parameters.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionFunctionBase

Throws

TokenReflection\Exception\ParseException
If parameters could not be parsed.
final protected TokenReflection\ReflectionFunctionBase
# parseStaticVariables( TokenReflection\Stream\StreamBase $tokenStream )

Parses static variables.

Parses static variables.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionFunctionBase

Throws

TokenReflection\Exception\ParseException
If static variables could not be parsed.
Methods inherited from TokenReflection\ReflectionElement
__construct(), getDocblockTemplates(), getEndLine(), getEndPosition(), getExtension(), getExtensionName(), getFileName(), getFileReflection(), getSource(), getStartLine(), getStartPosition(), parse(), parseDocComment(), parseStream(), processParent()
Methods inherited from TokenReflection\ReflectionBase
__get(), __isset(), exists(), get(), getAnnotation(), getAnnotations(), getBroker(), getDocComment(), hasAnnotation(), isDeprecated(), isInternal(), isTokenized(), isUserDefined()
Constants inherited from TokenReflection\ReflectionElement
DOCBLOCK_TEMPLATE_END, DOCBLOCK_TEMPLATE_START
Properties summary
protected string $namespaceName
#

Function/method namespace name.

Function/method namespace name.

protected array $parameters array()
#

Parameters.

Parameters.

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