Overview

Namespaces

  • TokenReflection
    • Broker
      • Backend
    • Dummy
    • Exception
    • Invalid
    • Php
    • Stream

Interfaces

  • Backend
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Interface Backend

Broker backend interface.

Defines methods for storing and retrieving reflection objects.

Direct known implementers

TokenReflection\Broker\Backend\Memory
Namespace: TokenReflection\Broker
Located at Broker/Backend.php
Methods summary
public boolean
# hasNamespace( string $namespaceName )

Returns if there was such namespace processed (FQN expected).

Returns if there was such namespace processed (FQN expected).

Parameters

$namespaceName
string
$namespaceName Namespace name

Returns

boolean
public TokenReflection\IReflectionNamespace|null
# getNamespace( string $namespaceName )

Returns a reflection object of the given namespace.

Returns a reflection object of the given namespace.

Parameters

$namespaceName
string
$namespaceName Namespace name

Returns

TokenReflection\IReflectionNamespace|null
public boolean
# hasClass( string $className )

Returns if there was such class processed (FQN expected).

Returns if there was such class processed (FQN expected).

Parameters

$className
string
$className Class name

Returns

boolean
public TokenReflection\IReflectionClass|null
# getClass( string $className )

Returns a reflection object of the given class (FQN expected).

Returns a reflection object of the given class (FQN expected).

Parameters

$className
string
$className CLass bame

Returns

TokenReflection\IReflectionClass|null
public array
# getClasses( integer $type = TokenReflection\Broker\Backend::TOKENIZED_CLASSES )

Returns all classes from all namespaces.

Returns all classes from all namespaces.

Parameters

$type
integer
$type Returned class types (multiple values may be OR-ed)

Returns

array
public boolean
# hasConstant( string $constantName )

Returns if there was such constant processed (FQN expected).

Returns if there was such constant processed (FQN expected).

Parameters

$constantName
string
$constantName Constant name

Returns

boolean
public TokenReflection\IReflectionConstant|null
# getConstant( string $constantName )

Returns a reflection object of a constant (FQN expected).

Returns a reflection object of a constant (FQN expected).

Parameters

$constantName
string
$constantName Constant name

Returns

TokenReflection\IReflectionConstant|null
public array
# getConstants( )

Returns all constants from all namespaces.

Returns all constants from all namespaces.

Returns

array
public boolean
# hasFunction( string $functionName )

Returns if there was such function processed (FQN expected).

Returns if there was such function processed (FQN expected).

Parameters

$functionName
string
$functionName Function name

Returns

boolean
public TokenReflection\IReflectionFunction|null
# getFunction( string $functionName )

Returns a reflection object of a function (FQN expected).

Returns a reflection object of a function (FQN expected).

Parameters

$functionName
string
$functionName Function name

Returns

TokenReflection\IReflectionFunction|null
public array
# getFunctions( )

Returns all functions from all namespaces.

Returns all functions from all namespaces.

Returns

array
public boolean
# isFileProcessed( string $fileName )

Returns if the given file was already processed.

Returns if the given file was already processed.

Parameters

$fileName
string
$fileName File name

Returns

boolean
public boolean
# hasFile( string $fileName )

Returns if a file with the given filename has been processed.

Returns if a file with the given filename has been processed.

Parameters

$fileName
string
$fileName File name

Returns

boolean
public TokenReflection\ReflectionFile
# getFile( string $fileName )

Returns a file reflection.

Returns a file reflection.

Parameters

$fileName
string
$fileName File name

Returns

TokenReflection\ReflectionFile

Throws

TokenReflection\Exception\RuntimeException
If the requested file has not been processed
public array
# getFiles( )

Returns file reflections.

Returns file reflections.

Returns

array
public TokenReflection\Stream\StreamBase
# getFileTokens( string $fileName )

Returns an array of tokens for a particular file.

Returns an array of tokens for a particular file.

Parameters

$fileName
string
$fileName File name

Returns

TokenReflection\Stream\StreamBase
public TokenReflection\Broker\Backend
# addFile( TokenReflection\Stream\StreamBase $tokenStream, TokenReflection\ReflectionFile $file )

Adds a file to the backend storage.

Adds a file to the backend storage.

Parameters

$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token stream
$file
TokenReflection\ReflectionFile
$file File reflection object

Returns

TokenReflection\Broker\Backend
public TokenReflection\Broker\Backend
# setBroker( TokenReflection\Broker $broker )

Sets the reflection broker instance.

Sets the reflection broker instance.

Parameters

$broker
TokenReflection\Broker
$broker Reflection broker

Returns

TokenReflection\Broker\Backend
public TokenReflection\Broker
# getBroker( )

Returns the reflection broker instance.

Returns the reflection broker instance.

Returns

TokenReflection\Broker
$broker Reflection broker
public TokenReflection\Broker\Backend
# setStoringTokenStreams( boolean $store )

Sets if token streams are stored in the backend.

Sets if token streams are stored in the backend.

Parameters

$store
boolean
$store

Returns

TokenReflection\Broker\Backend
public boolean
# getStoringTokenStreams( )

Returns if token streams are stored in the backend.

Returns if token streams are stored in the backend.

Returns

boolean
Constants summary
integer TOKENIZED_CLASSES 1
#

Identifier of the tokenized classes list.

Identifier of the tokenized classes list.

integer INTERNAL_CLASSES 2
#

Identifier of the internal classes list.

Identifier of the internal classes list.

integer NONEXISTENT_CLASSES 4
#

Identifier of the nonexisten classes list.

Identifier of the nonexisten classes list.

PHP Token Reflection API documentation generated by ApiGen 2.8.0