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 Resolver

TokenReflection Resolver class.

Namespace: TokenReflection
Located at Resolver.php
Methods summary
final public
# __construct( )

Constructor.

Constructor.

Prevents from creating instances.

Throws

LogicException
When trying to create a class instance.
final public static string
# resolveClassFQN( string $className, array $aliases, string $namespaceName = null )

Returns a fully qualified name of a class using imported/aliased namespaces.

Returns a fully qualified name of a class using imported/aliased namespaces.

Parameters

$className
string
$className Input class name
$aliases
array
$aliases Namespace import aliases
$namespaceName
string
$namespaceName Context namespace name

Returns

string
final public static string
# getValueDefinition( array $tokens, TokenReflection\ReflectionElement $reflection )

Returns a property/parameter/constant/static variable value definition.

Returns a property/parameter/constant/static variable value definition.

Parameters

$tokens
array
$tokens Tokenized definition
$reflection
TokenReflection\ReflectionElement
$reflection Caller reflection

Returns

string

Throws

TokenReflection\Exception\RuntimeException
If an invalid reflection object was provided.
TokenReflection\Exception\RuntimeException
If an invalid source code was provided.
final public static array
# getSourceCode( array $tokens )

Returns a part of the source code defined by given tokens.

Returns a part of the source code defined by given tokens.

Parameters

$tokens
array
$tokens Tokens array

Returns

array
final public static array
# findConstants( array $tokens, TokenReflection\ReflectionElement $reflection )

Finds constant names in the token definition.

Finds constant names in the token definition.

Parameters

$tokens
array
$tokens Tokenized source code
$reflection
TokenReflection\ReflectionElement
$reflection Caller reflection

Returns

array
Constants summary
null CONSTANT_NOT_FOUND '~~NOT RESOLVED~~'
#

Placeholder for non-existen constants.

Placeholder for non-existen constants.

PHP Token Reflection API documentation generated by ApiGen 2.8.0