\Thrift\ClassLoaderThriftClassLoader

Summary

Methods
Properties
Constants
__construct()
registerNamespace()
registerDefinition()
register()
loadClass()
findFile()
No public properties found
No constants found
findFileInApc()
$namespaces
$definitions
$apc
$apc_prefix
N/A
No private methods found
No private properties found
N/A

Properties

$namespaces

$namespaces : array

Namespaces path

Type

array

$definitions

$definitions : \Thrift\ClassLoader\type

Thrift definition paths

Type

\Thrift\ClassLoader\type

$apc

$apc : boolean

Do we use APC cache ?

Type

boolean

$apc_prefix

$apc_prefix : string

APC Cache prefix

Type

string

Methods

__construct()

__construct(boolean  $apc = false, string  $apc_prefix = null) 

Set autoloader to use APC cache

Parameters

boolean $apc
string $apc_prefix

registerNamespace()

registerNamespace(string  $namespace, array|string  $paths) 

Registers a namespace.

Parameters

string $namespace

The namespace

array|string $paths

The location(s) of the namespace

registerDefinition()

registerDefinition(string  $namespace, array|string  $paths) 

Registers a Thrift definition namespace.

Parameters

string $namespace

The definition namespace

array|string $paths

The location(s) of the definition namespace

register()

register(Boolean  $prepend = false) 

Registers this instance as an autoloader.

Parameters

Boolean $prepend

Whether to prepend the autoloader or not

loadClass()

loadClass(string  $class) 

Loads the given class, definition or interface.

Parameters

string $class

The name of the class

findFile()

findFile(string  $class) : string

Find class in namespaces or definitions directories

Parameters

string $class

Returns

string

findFileInApc()

findFileInApc(string  $class) : string

Loads the given class or interface in APC.

Parameters

string $class

The name of the class

Returns

string