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 ReflectionConstant

Tokenized constant reflection.

TokenReflection\ReflectionBase implements TokenReflection\IReflection
Extended by TokenReflection\ReflectionElement
Extended by TokenReflection\ReflectionConstant implements TokenReflection\IReflectionConstant
Namespace: TokenReflection
Located at ReflectionConstant.php
Methods summary
public string
# getShortName( )

Returns the unqualified name (UQN).

Returns the unqualified name (UQN).

Returns

string

Implementation of

TokenReflection\IReflectionConstant::getShortName()
public string|null
# getDeclaringClassName( )

Returns the name of the declaring class.

Returns the name of the declaring class.

Returns

string|null

Implementation of

TokenReflection\IReflectionConstant::getDeclaringClassName()
public TokenReflection\ReflectionClass|null
# getDeclaringClass( )

Returns a reflection of the declaring class.

Returns a reflection of the declaring class.

Returns

TokenReflection\ReflectionClass|null

Implementation of

TokenReflection\IReflectionConstant::getDeclaringClass()
public string
# getNamespaceName( )

Returns the namespace name.

Returns the namespace name.

Returns

string

Implementation of

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

Returns if the class is defined within a namespace.

Returns if the class is defined within a namespace.

Returns

boolean

Implementation of

TokenReflection\IReflectionConstant::inNamespace()
public mixed
# getValue( )

Returns the constant value.

Returns the constant value.

Returns

mixed

Implementation of

TokenReflection\IReflectionConstant::getValue()
public string
# getValueDefinition( )

Returns the constant value definition.

Returns the constant value definition.

Returns

string

Implementation of

TokenReflection\IReflectionConstant::getValueDefinition()
public string
# getOriginalValueDefinition( )

Returns the originaly provided value definition.

Returns the originaly provided value definition.

Returns

string
public string
# __toString( )

Returns the string representation of the reflection object.

Returns the string representation of the reflection object.

Returns

string

Implementation of

TokenReflection\IReflectionConstant::__toString()
public static string|null
# export( TokenReflection\Broker $broker, string|object|null $class, string $constant, boolean $return = false )

Exports a reflected object.

Exports a reflected object.

Parameters

$broker
TokenReflection\Broker
$broker Broker instance
$class
string|object|null
$class Class name, class instance or null
$constant
string
$constant Constant 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

Implementation of

TokenReflection\IReflectionConstant::getNamespaceAliases()
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 boolean
# isValid( )

Returns if the constant definition is valid.

Returns if the constant definition is valid.

Returns

boolean

Implementation of

TokenReflection\IReflectionConstant::isValid()
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\ReflectionConstant
# parseDocComment( TokenReflection\Stream\StreamBase $tokenStream, TokenReflection\IReflection $parent )

Find the appropriate docblock.

Find the appropriate docblock.

Parameters

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

Returns

TokenReflection\ReflectionConstant

Overrides

TokenReflection\ReflectionElement::parseDocComment()
protected TokenReflection\ReflectionConstant
# 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\ReflectionConstant
protected TokenReflection\ReflectionConstant
# parseName( TokenReflection\Stream\StreamBase $tokenStream )

Parses the constant name.

Parses the constant name.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionConstant

Throws

TokenReflection\Exception\ParseReflection
If the constant name could not be determined.
Methods inherited from TokenReflection\ReflectionElement
__construct(), getDocblockTemplates(), getEndLine(), getEndPosition(), getExtension(), getExtensionName(), getFileName(), getFileReflection(), getSource(), getStartLine(), getStartPosition(), parseChildren(), parseStream()
Methods inherited from TokenReflection\ReflectionBase
__get(), __isset(), exists(), get(), getAnnotation(), getAnnotations(), getBroker(), getDocComment(), getName(), hasAnnotation(), isDeprecated(), isInternal(), isTokenized(), isUserDefined()
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