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 ReflectionNamespace

Tokenized namespace reflection.

TokenReflection\ReflectionNamespace implements TokenReflection\IReflectionNamespace
Namespace: TokenReflection
Located at ReflectionNamespace.php
Methods summary
public
# __construct( string $name, TokenReflection\Broker $broker )

Constructor.

Constructor.

Parameters

$name
string
$name Namespace name
$broker
TokenReflection\Broker
$broker Reflection broker
public string
# getName( )

Returns the name.

Returns the name.

Returns

string

Implementation of

TokenReflection\IReflection::getName()
public boolean
# isInternal( )

Returns if the namespace is internal.

Returns if the namespace is internal.

Always false.

Returns

boolean

Implementation of

TokenReflection\IReflection::isInternal()
public boolean
# isUserDefined( )

Returns if the namespace is user defined.

Returns if the namespace is user defined.

Always true.

Returns

boolean

Implementation of

TokenReflection\IReflection::isUserDefined()
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 boolean
# hasClass( string $className )

Returns if the namespace contains a class of the given name.

Returns if the namespace contains a class of the given name.

Parameters

$className
string
$className Class name

Returns

boolean

Implementation of

TokenReflection\IReflectionNamespace::hasClass()
public TokenReflection\ReflectionClass
# getClass( string $className )

Return a class reflection.

Return a class reflection.

Parameters

$className
string
$className Class name

Returns

TokenReflection\ReflectionClass

Throws

TokenReflection\Exception\RuntimeException
If the requested class reflection does not exist.

Implementation of

TokenReflection\IReflectionNamespace::getClass()
public array
# getClasses( )

Returns class reflections.

Returns class reflections.

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getClasses()
public array
# getClassNames( )

Returns class names (FQN).

Returns class names (FQN).

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getClassNames()
public array
# getClassShortNames( )

Returns class unqualified names (UQN).

Returns class unqualified names (UQN).

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getClassShortNames()
public boolean
# hasConstant( string $constantName )

Returns if the namespace contains a constant of the given name.

Returns if the namespace contains a constant of the given name.

Parameters

$constantName
string
$constantName Constant name

Returns

boolean

Implementation of

TokenReflection\IReflectionNamespace::hasConstant()
public TokenReflection\ReflectionConstant
# getConstant( string $constantName )

Returns a constant reflection.

Returns a constant reflection.

Parameters

$constantName
string
$constantName Constant name

Returns

TokenReflection\ReflectionConstant

Throws

TokenReflection\Exception\RuntimeException
If the required constant does not exist.

Implementation of

TokenReflection\IReflectionNamespace::getConstant()
public array
# getConstants( )

Returns constant reflections.

Returns constant reflections.

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getConstants()
public array
# getConstantNames( )

Returns constant names (FQN).

Returns constant names (FQN).

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getConstantNames()
public array
# getConstantShortNames( )

Returns constant unqualified names (UQN).

Returns constant unqualified names (UQN).

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getConstantShortNames()
public boolean
# hasFunction( string $functionName )

Returns if the namespace contains a function of the given name.

Returns if the namespace contains a function of the given name.

Parameters

$functionName
string
$functionName Function name

Returns

boolean

Implementation of

TokenReflection\IReflectionNamespace::hasFunction()
public TokenReflection\ReflectionFunction
# getFunction( string $functionName )

Returns a function reflection.

Returns a function reflection.

Parameters

$functionName
string
$functionName Function name

Returns

TokenReflection\ReflectionFunction

Throws

TokenReflection\Exception\RuntimeException
If the required function does not exist.

Implementation of

TokenReflection\IReflectionNamespace::getFunction()
public array
# getFunctions( )

Returns function reflections.

Returns function reflections.

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getFunctions()
public array
# getFunctionNames( )

Returns function names (FQN).

Returns function names (FQN).

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getFunctionNames()
public array
# getFunctionShortNames( )

Returns function unqualified names (UQN).

Returns function unqualified names (UQN).

Returns

array

Implementation of

TokenReflection\IReflectionNamespace::getFunctionShortNames()
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 string
# __toString( )

Returns the string representation of the reflection object.

Returns the string representation of the reflection object.

Returns

string

Implementation of

TokenReflection\IReflectionNamespace::__toString()
public static string|null
# export( TokenReflection\Broker $broker, string $namespace, boolean $return = false )

Exports a reflected object.

Exports a reflected object.

Parameters

$broker
TokenReflection\Broker
$broker Broker instance
$namespace
string
$namespace Namespace 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 TokenReflection\ReflectionNamespace
# addFileNamespace( TokenReflection\ReflectionFileNamespace $namespace )

Adds a namespace part from a file.

Adds a namespace part from a file.

Parameters

$namespace
TokenReflection\ReflectionFileNamespace
$namespace Namespace part

Returns

TokenReflection\ReflectionNamespace

Throws

TokenReflection\Exception\FileProcessingException
If one of classes, functions or constants form the namespace are already defined
public
# getSource( )

Returns the appropriate source code part.

Returns the appropriate source code part.

Impossible for namespaces.

Throws

TokenReflection\Exception\RuntimeException
If the method is called, because it's unsupported.
public TokenReflection\Broker|null
# getBroker( )

Returns the reflection broker used by this reflection object.

Returns the reflection broker used by this reflection object.

Returns

TokenReflection\Broker|null

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()
Constants summary
string NO_NAMESPACE_NAME 'no-namespace'
#

The name of the pseudo-namespace meaning there is no namespace.

The name of the pseudo-namespace meaning there is no namespace.

This name is chosen so that no real namespace could ever have it.

PHP Token Reflection API documentation generated by ApiGen 2.8.0