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 ReflectionMethod

Reflection of a not tokenized but defined class method.

Descendant of the internal reflection with additional features.

ReflectionFunctionAbstract implements Reflector
Extended by ReflectionMethod
Extended by TokenReflection\Php\ReflectionMethod implements TokenReflection\Php\IReflection, TokenReflection\IReflectionMethod
Namespace: TokenReflection\Php
Located at Php/ReflectionMethod.php
Methods summary
public
# __construct( string|TokenReflection\Php\ReflectionClass|ReflectionClass $class, string $methodName, TokenReflection\Broker $broker )

Constructor.

Constructor.

Parameters

$class
string|TokenReflection\Php\ReflectionClass|ReflectionClass
$class Defining class
$methodName
string
$methodName Method name
$broker
TokenReflection\Broker
$broker Reflection broker

Overrides

ReflectionMethod::__construct()
public TokenReflection\IReflectionClass
# getDeclaringClass( )

Returns the declaring class reflection.

Returns the declaring class reflection.

Returns

TokenReflection\IReflectionClass

Overrides

ReflectionMethod::getDeclaringClass()

Implementation of

TokenReflection\IReflectionMethod::getDeclaringClass()
public string
# getDeclaringClassName( )

Returns the declaring class name.

Returns the declaring class name.

Returns

string

Implementation of

TokenReflection\IReflectionMethod::getDeclaringClassName()
public array
# getNamespaceAliases( )

Returns imported namespaces and aliases from the declaring namespace.

Returns imported namespaces and aliases from the declaring namespace.

Returns

array
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\ReflectionMethod
# getPrototype( )

Returns the method prototype.

Returns the method prototype.

Returns

TokenReflection\Php\ReflectionMethod

Overrides

ReflectionMethod::getPrototype()

Implementation of

TokenReflection\IReflectionMethod::getPrototype()
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 boolean
# isAccessible( )

Returns if the method is set accessible.

Returns if the method is set accessible.

Returns

boolean
public
# setAccessible( boolean $accessible )

Sets a method to be accessible or not.

Sets a method to be accessible or not.

Introduced in PHP 5.3.2. Throws an exception if run on an older version.

Parameters

$accessible
boolean
$accessible

Throws

TokenReflection\Exception\RuntimeException
If run on PHP version < 5.3.2.

Overrides

ReflectionMethod::setAccessible()

Implementation of

TokenReflection\IReflectionMethod::setAccessible()
public boolean
# is( integer $filter = null )

Shortcut for isPublic(), ... methods that allows or-ed modifiers.

Shortcut for isPublic(), ... methods that allows or-ed modifiers.

Parameters

$filter
integer
$filter Filter

Returns

boolean

Implementation of

TokenReflection\IReflectionMethod::is()
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()
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( object $object )

Returns the function/method as closure.

Returns the function/method as closure.

Parameters

$object
object
$object Object

Returns

Closure

Implementation of

TokenReflection\IReflectionMethod::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 string
# getOriginalName( )

Returns the original name when importing from a trait.

Returns the original name when importing from a trait.

Returns

string

Implementation of

TokenReflection\IReflectionMethod::getOriginalName()
public null
# getOriginal( )

Returns the original method when importing from a trait.

Returns the original method when importing from a trait.

Returns

null

Implementation of

TokenReflection\IReflectionMethod::getOriginal()
public null
# getOriginalModifiers( )

Returns the original modifiers value when importing from a trait.

Returns the original modifiers value when importing from a trait.

Returns

null

Implementation of

TokenReflection\IReflectionMethod::getOriginalModifiers()
public TokenReflection\IReflectionClass|null
# getDeclaringTrait( )

Returns the defining trait.

Returns the defining trait.

Returns

TokenReflection\IReflectionClass|null

Implementation of

TokenReflection\IReflectionMethod::getDeclaringTrait()
public string|null
# getDeclaringTraitName( )

Returns the declaring trait name.

Returns the declaring trait name.

Returns

string|null

Implementation of

TokenReflection\IReflectionMethod::getDeclaringTraitName()
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\IReflection
# 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\IReflection

Throws

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

Implementation of

TokenReflection\Php\IReflection::create()
Methods inherited from ReflectionMethod
__toString(), export(), getModifiers(), invoke(), invokeArgs(), isAbstract(), isConstructor(), isDestructor(), isFinal(), isPrivate(), isProtected(), isPublic(), isStatic()
Methods inherited from ReflectionFunctionAbstract
getDocComment(), getEndLine(), getExtension(), getExtensionName(), getFileName(), getName(), getNamespaceName(), getNumberOfParameters(), getNumberOfRequiredParameters(), getShortName(), getStartLine(), getStaticVariables(), inNamespace(), isClosure(), isDeprecated(), isInternal(), isUserDefined(), returnsReference()
Constants inherited from ReflectionMethod
IS_ABSTRACT, IS_FINAL, IS_PRIVATE, IS_PROTECTED, IS_PUBLIC, IS_STATIC
Properties inherited from ReflectionMethod
$class, $name
PHP Token Reflection API documentation generated by ApiGen 2.8.0