Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes

Zend_Loader_PluginLoader Class Reference

Inheritance diagram for Zend_Loader_PluginLoader:
Zend_Loader_PluginLoader_Interface

Public Member Functions

 __construct (Array $prefixToPaths=array(), $staticRegistryName=null)
 addPrefixPath ($prefix, $path)
 getPaths ($prefix=null)
 clearPaths ($prefix=null)
 removePrefixPath ($prefix, $path=null)
 isLoaded ($name)
 getClassName ($name)
 getClassPath ($name)
 load ($name, $throwExceptions=true)

Static Public Member Functions

static setIncludeFileCache ($file)
static getIncludeFileCache ()

Protected Member Functions

 _formatPrefix ($prefix)
 _formatName ($name)

Static Protected Member Functions

static _appendIncFile ($incFile)

Protected Attributes

 $_loadedPluginPaths = array()
 $_loadedPlugins = array()
 $_prefixToPaths = array()
 $_useStaticRegistry = null

Static Protected Attributes

static $_includeFileCache
static $_staticLoadedPluginPaths = array()
static $_staticLoadedPlugins = array()
static $_staticPrefixToPaths = array()

Detailed Description

Definition at line 38 of file PluginLoader.php.


Constructor & Destructor Documentation

__construct ( Array $  prefixToPaths = array(),
staticRegistryName = null 
)

Constructor

Parameters:
array$prefixToPaths
string$staticRegistryNameOPTIONAL

Definition at line 101 of file PluginLoader.php.


Member Function Documentation

static _appendIncFile ( incFile ) [static, protected]

Append an include_once statement to the class file cache

Parameters:
string$incFile
Returns:
void

Definition at line 468 of file PluginLoader.php.

_formatName ( name ) [protected]

Normalize plugin name

Parameters:
string$name
Returns:
string

Definition at line 271 of file PluginLoader.php.

_formatPrefix ( prefix ) [protected]

Format prefix for internal use

Parameters:
string$prefix
Returns:
string

Definition at line 124 of file PluginLoader.php.

addPrefixPath ( prefix,
path 
)

Add prefixed paths to the registry of paths

Parameters:
string$prefix
string$path
Returns:
Zend_Loader_PluginLoader

Implements Zend_Loader_PluginLoader_Interface.

Definition at line 139 of file PluginLoader.php.

clearPaths ( prefix = null )

Clear path stack

Parameters:
string$prefix
Returns:
bool False only if $prefix does not exist

Definition at line 200 of file PluginLoader.php.

getClassName ( name )

Return full class name for a named plugin

Parameters:
string$name
Returns:
string|false False if class not found, class name otherwise

Implements Zend_Loader_PluginLoader_Interface.

Definition at line 298 of file PluginLoader.php.

getClassPath ( name )

Get path to plugin class

Parameters:
mixed$name
Returns:
string|false False if not found

Definition at line 318 of file PluginLoader.php.

static getIncludeFileCache (  ) [static]

Retrieve class file cache path

Returns:
string|null

Definition at line 457 of file PluginLoader.php.

getPaths ( prefix = null )

Get path stack

Parameters:
string$prefix
Returns:
false|array False if prefix does not exist, array otherwise

Definition at line 168 of file PluginLoader.php.

isLoaded ( name )

Whether or not a Plugin by a specific name is loaded

Parameters:
string$name
Returns:
Zend_Loader_PluginLoader

Implements Zend_Loader_PluginLoader_Interface.

Definition at line 282 of file PluginLoader.php.

load ( name,
throwExceptions = true 
)

Load a plugin via the name provided

Parameters:
string$name
bool$throwExceptionsWhether or not to throw exceptions if the class is not resolved
Returns:
string|false Class name of loaded class; false if $throwExceptions if false and no class found
Exceptions:
Zend_Loader_Exceptionif class not found

Definition at line 354 of file PluginLoader.php.

removePrefixPath ( prefix,
path = null 
)

Remove a prefix (or prefixed-path) from the registry

Parameters:
string$prefix
string$pathOPTIONAL
Returns:
Zend_Loader_PluginLoader

Implements Zend_Loader_PluginLoader_Interface.

Definition at line 237 of file PluginLoader.php.

static setIncludeFileCache ( file ) [static]

Set path to class file cache

Specify a path to a file that will add include_once statements for each plugin class loaded. This is an opt-in feature for performance purposes.

Parameters:
string$file
Returns:
void
Exceptions:
Zend_Loader_PluginLoader_Exceptionif file is not writeable or path does not exist

Definition at line 429 of file PluginLoader.php.


The documentation for this class was generated from the following file: