Loader/PluginLoader.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Loader
- subpackage
- PluginLoader
- version
- $Id: PluginLoader.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Loader_PluginLoader
Generic plugin class loader
- Implements
- \Zend_Loader_PluginLoader_Interface
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Loader
- subpackage
- PluginLoader
Properties



array
$_loadedPluginPaths= 'array'
Instance loaded plugin paths
Default valuearray
Details
- Type
- array



array
$_prefixToPaths= 'array'
Instance registry property
Default valuearray
Details
- Type
- array



array
$_staticLoadedPluginPaths= 'array'
staticStatically loaded plugin path mappings
Default valuearray
Details
- Type
- array



array
$_staticLoadedPlugins= 'array'
staticStatically loaded plugins
Default valuearray
Details
- Type
- array



array
$_staticPrefixToPaths= 'array'
staticStatic registry property
Default valuearray
Details
- Type
- array



string|null
$_useStaticRegistry= 'null'
Whether to use a statically named registry for loading plugins
Default valuenull
Details
- Type
- stringnull
Methods



_appendIncFile(
string $incFile
)
:
void
staticAppend an include_once statement to the class file cache
Parameters
Name |
Type |
Description |
$incFile |
string |
|



_formatPrefix(
string $prefix
)
:
string
Format prefix for internal use
Parameters
Name |
Type |
Description |
$prefix |
string |
|
Returns



addPrefixPath(
string $prefix, string $path
)
:
\Zend_Loader_PluginLoader
Add prefixed paths to the registry of paths
Parameters
Name |
Type |
Description |
$prefix |
string |
|
$path |
string |
|
Returns



getClassName(
string $name
)
:
string|false
Return full class name for a named plugin
Parameters
Name |
Type |
Description |
$name |
string |
|
Returns
Type |
Description |
stringfalse |
False if class not found, class name otherwise |



getIncludeFileCache(
)
:
string|null
staticRetrieve class file cache path
Returns
Type |
Description |
stringnull |
|



isLoaded(
string $name
)
:
\Zend_Loader_PluginLoader
Whether or not a Plugin by a specific name is loaded
Parameters
Name |
Type |
Description |
$name |
string |
|
Returns



load(
string $name, bool $throwExceptions
=
true
)
:
string|false
Load a plugin via the name provided
Parameters
Name |
Type |
Description |
$name |
string |
|
$throwExceptions |
bool |
Whether or not to throw exceptions if the class is not resolved |
Returns
Type |
Description |
stringfalse |
Class name of loaded class; false if $throwExceptions if false and no class found |
Throws



removePrefixPath(
string $prefix, string $path
=
null
)
:
\Zend_Loader_PluginLoader
Remove a prefix (or prefixed-path) from the registry
Parameters
Name |
Type |
Description |
$prefix |
string |
|
$path |
string |
OPTIONAL |
Returns



setIncludeFileCache(
string $file
)
:
void
staticSet 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
Name |
Type |
Description |
$file |
string |
|
Throws