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 ReflectionAnnotation

Docblock parser.

Namespace: TokenReflection
Located at ReflectionAnnotation.php
Methods summary
public
# __construct( TokenReflection\ReflectionBase $reflection, string|boolean $docComment = false )

Constructor.

Constructor.

Parameters

$reflection
TokenReflection\ReflectionBase
$reflection Parent reflection object
$docComment
string|boolean
$docComment Docblock definition
public string|boolean
# getDocComment( )

Returns the docblock.

Returns the docblock.

Returns

string|boolean
public boolean
# hasAnnotation( string $annotation )

Returns if the current docblock contains the requrested annotation.

Returns if the current docblock contains the requrested annotation.

Parameters

$annotation
string
$annotation Annotation name

Returns

boolean
public string|array|null
# getAnnotation( string $annotation )

Returns a particular annotation value.

Returns a particular annotation value.

Parameters

$annotation
string
$annotation Annotation name

Returns

string|array|null
public array
# getAnnotations( )

Returns all parsed annotations.

Returns all parsed annotations.

Returns

array
public TokenReflection\ReflectionAnnotation
# setTemplates( array $templates )

Sets Docblock templates.

Sets Docblock templates.

Parameters

$templates
array
$templates Docblock templates

Returns

TokenReflection\ReflectionAnnotation

Throws

TokenReflection\Exception\RuntimeException
If an invalid annotation template was provided.
Constants summary
string SHORT_DESCRIPTION ' short_description'
#

Main description annotation identifier.

Main description annotation identifier.

White space at the beginning on purpose.

string LONG_DESCRIPTION ' long_description'
#

Sub description annotation identifier.

Sub description annotation identifier.

White space at the beginning on purpose.

PHP Token Reflection API documentation generated by ApiGen 2.8.0