Overview

Namespaces

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

Classes

  • Memory
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class Memory

Memory broker backend.

Stores parsed reflection objects in memory.

TokenReflection\Broker\Backend\Memory implements TokenReflection\Broker\Backend
Namespace: TokenReflection\Broker\Backend
Located at Broker/Backend/Memory.php
Methods summary
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

Implementation of

TokenReflection\Broker\Backend::hasFile()
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\BrokerException
If the requested file has not been processed

Implementation of

TokenReflection\Broker\Backend::getFile()
public array
# getFiles( )

Returns file reflections.

Returns file reflections.

Returns

array

Implementation of

TokenReflection\Broker\Backend::getFiles()
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

Implementation of

TokenReflection\Broker\Backend::hasNamespace()
public TokenReflection\IReflectionNamespace
# 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

Throws

TokenReflection\Exception\BrokerException
If the requested namespace does not exist.

Implementation of

TokenReflection\Broker\Backend::getNamespace()
public array
# getNamespaces( )

Returns all present namespaces.

Returns all present namespaces.

Returns

array
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

Implementation of

TokenReflection\Broker\Backend::hasClass()
public TokenReflection\IReflectionClass
# 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

Implementation of

TokenReflection\Broker\Backend::getClass()
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

Implementation of

TokenReflection\Broker\Backend::getClasses()
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

Implementation of

TokenReflection\Broker\Backend::hasConstant()
public TokenReflection\IReflectionConstant
# 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

Throws

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

Implementation of

TokenReflection\Broker\Backend::getConstant()
public array
# getConstants( )

Returns all constants from all namespaces.

Returns all constants from all namespaces.

Returns

array

Implementation of

TokenReflection\Broker\Backend::getConstants()
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

Implementation of

TokenReflection\Broker\Backend::hasFunction()
public TokenReflection\IReflectionFunction
# 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

Throws

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

Implementation of

TokenReflection\Broker\Backend::getFunction()
public array
# getFunctions( )

Returns all functions from all namespaces.

Returns all functions from all namespaces.

Returns

array

Implementation of

TokenReflection\Broker\Backend::getFunctions()
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

Implementation of

TokenReflection\Broker\Backend::isFileProcessed()
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

Throws

TokenReflection\Exception\BrokerException
If the requested file was not processed.

Implementation of

TokenReflection\Broker\Backend::getFileTokens()
public TokenReflection\Broker\Backend\Memory
# 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\Memory

Implementation of

TokenReflection\Broker\Backend::addFile()
public TokenReflection\Broker\Backend\Memory
# 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\Memory

Implementation of

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

Returns the reflection broker instance.

Returns the reflection broker instance.

Returns

TokenReflection\Broker
$broker Reflection broker

Implementation of

TokenReflection\Broker\Backend::getBroker()
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

Implementation of

TokenReflection\Broker\Backend::setStoringTokenStreams()
public boolean
# getStoringTokenStreams( )

Returns if token streams are stored in the backend.

Returns if token streams are stored in the backend.

Returns

boolean

Implementation of

TokenReflection\Broker\Backend::getStoringTokenStreams()
protected array
# parseClassLists( )

Prepares and returns used class lists.

Prepares and returns used class lists.

Returns

array
Constants inherited from TokenReflection\Broker\Backend
INTERNAL_CLASSES, NONEXISTENT_CLASSES, TOKENIZED_CLASSES
PHP Token Reflection API documentation generated by ApiGen 2.8.0