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 ReflectionElement

Basic class for reflection elements.

Defines a variety of common methods. All reflections are descendants of this class.

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

Direct known subclasses

TokenReflection\ReflectionClass, TokenReflection\ReflectionConstant, TokenReflection\ReflectionFileNamespace, TokenReflection\ReflectionFunctionBase, TokenReflection\ReflectionParameter, TokenReflection\ReflectionProperty

Indirect known subclasses

TokenReflection\ReflectionFunction, TokenReflection\ReflectionMethod
Abstract
Namespace: TokenReflection
Located at ReflectionElement.php
Methods summary
final public
# __construct( TokenReflection\Stream\StreamBase $tokenStream, TokenReflection\Broker $broker, TokenReflection\IReflection $parent = null )

Constructor.

Constructor.

Parameters

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

Throws

TokenReflection\Exception\ParseException
If an empty token stream was provided

Overrides

TokenReflection\ReflectionBase::__construct()
final protected
# parseStream( TokenReflection\Stream\StreamBase $tokenStream, TokenReflection\IReflection $parent = null )

Parses the token substream.

Parses the token substream.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream
$parent
TokenReflection\IReflection
$parent Parent reflection object
public string
# getFileName( )

Returns the file name the reflection object is defined in.

Returns the file name the reflection object is defined in.

Returns

string
public TokenReflection\ReflectionFile
# getFileReflection( )

Returns a file reflection.

Returns a file reflection.

Returns

TokenReflection\ReflectionFile

Throws

TokenReflection\Exception\RuntimeException
If the file is not stored inside the broker
public integer
# getStartLine( )

Returns the definition start line number in the file.

Returns the definition start line number in the file.

Returns

integer
public integer
# getEndLine( )

Returns the definition end line number in the file.

Returns the definition end line number in the file.

Returns

integer
public null
# getExtension( )

Returns the PHP extension reflection.

Returns the PHP extension reflection.

Alwyas returns null - everything is user defined.

Returns

null
public boolean
# getExtensionName( )

Returns the PHP extension name.

Returns the PHP extension name.

Alwyas returns false - everything is user defined.

Returns

boolean
public string
# getSource( )

Returns the appropriate source code part.

Returns the appropriate source code part.

Returns

string
public integer
# getStartPosition( )

Returns the start position in the file token stream.

Returns the start position in the file token stream.

Returns

integer
public integer
# getEndPosition( )

Returns the end position in the file token stream.

Returns the end position in the file token stream.

Returns

integer
protected array
# getDocblockTemplates( )

Returns the stack of docblock templates.

Returns the stack of docblock templates.

Returns

array
protected TokenReflection\ReflectionElement
# processParent( TokenReflection\IReflection $parent, TokenReflection\Stream\StreamBase $tokenStream )

Processes the parent reflection object.

Processes the parent reflection object.

Parameters

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

Returns

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

Parses the reflection object name.

Parses the reflection object name.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token substream

Returns

TokenReflection\ReflectionElement
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\Reflection
$parent Parent reflection object

Returns

TokenReflection\ReflectionElement
Methods inherited from TokenReflection\ReflectionBase
__get(), __isset(), exists(), get(), getAnnotation(), getAnnotations(), getBroker(), getDocComment(), getName(), getPrettyName(), hasAnnotation(), isDeprecated(), isInternal(), isTokenized(), isUserDefined()
Constants summary
string DOCBLOCK_TEMPLATE_START '/**#@+'
#

Docblock template start.

Docblock template start.

string DOCBLOCK_TEMPLATE_END '/**#@-*/'
#

Docblock template end.

Docblock template end.

Properties summary
protected integer $startPosition
#

Start position in the file token stream.

Start position in the file token stream.

protected array $docblockTemplates array()
#

Stack of actual docblock templates.

Stack of actual docblock templates.

Properties inherited from TokenReflection\ReflectionBase
$docComment, $name
PHP Token Reflection API documentation generated by ApiGen 2.8.0