Zend Framework  1.12
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Zend_Loader_PluginLoader Class Reference

Public Member Functions

 __construct (Array $prefixToPaths=array(), $staticRegistryName=null)
 Constructor.
 
 addPrefixPath ($prefix, $path)
 Add prefixed paths to the registry of paths.
 
 getPaths ($prefix=null)
 Get path stack.
 
 clearPaths ($prefix=null)
 Clear path stack.
 
 removePrefixPath ($prefix, $path=null)
 Remove a prefix (or prefixed-path) from the registry.
 
 isLoaded ($name)
 Whether or not a Plugin by a specific name is loaded.
 
 getClassName ($name)
 Return full class name for a named plugin.
 
 getClassPath ($name)
 Get path to plugin class.
 
 load ($name, $throwExceptions=true)
 Load a plugin via the name provided.
 
- Public Member Functions inherited from Zend_Loader_PluginLoader_Interface
 load ($name)
 Load a helper via the name provided.
 

Static Public Member Functions

static setIncludeFileCache ($file)
 Set path to class file cache.
 
static getIncludeFileCache ()
 Retrieve class file cache path.
 

Protected Member Functions

 _formatPrefix ($prefix)
 Format prefix for internal use.
 
 _formatName ($name)
 Normalize plugin name.
 

Static Protected Member Functions

static _appendIncFile ($incFile)
 Append an include_once statement to the class file cache.
 

Protected Attributes

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

Static Protected Attributes

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

Constructor & Destructor Documentation

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

Constructor.

Parameters
array$prefixToPaths
string$staticRegistryNameOPTIONAL

Member Function Documentation

static _appendIncFile (   $incFile)
staticprotected

Append an include_once statement to the class file cache.

Parameters
string$incFile
Returns
void
_formatName (   $name)
protected

Normalize plugin name.

Parameters
string$name
Returns
string
_formatPrefix (   $prefix)
protected

Format prefix for internal use.

Parameters
string$prefix
Returns
string
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.

clearPaths (   $prefix = null)

Clear path stack.

Parameters
string$prefix
Returns
bool False only if $prefix does not exist
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.

getClassPath (   $name)

Get path to plugin class.

Parameters
mixed$name
Returns
string|false False if not found
static getIncludeFileCache ( )
static

Retrieve class file cache path.

Returns
string|null
getPaths (   $prefix = null)

Get path stack.

Parameters
string$prefix
Returns
false|array False if prefix does not exist, array otherwise
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.

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
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.

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

Member Data Documentation

$_includeFileCache
staticprotected
$_loadedPluginPaths = array()
protected
$_loadedPlugins = array()
protected
$_prefixToPaths = array()
protected
$_staticLoadedPluginPaths = array()
staticprotected
$_staticLoadedPlugins = array()
staticprotected
$_staticPrefixToPaths = array()
staticprotected
$_useStaticRegistry = null
protected