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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Loader
- Subpackage
- PluginLoader
- Version
- $Id$
\Zend_Loader_PluginLoader
Package: Zend_Loader\PluginLoaderGeneric plugin class loader
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
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 = nullWhether to use a statically named registry for loading plugins
Default valuenullDetails- Type
- string | null
Methods



__construct(array $prefixToPaths = array(), string $staticRegistryName = null) : voidParameters| Name | Type | Description |
|---|
| $prefixToPaths | array | |
|---|
| $staticRegistryName | string | OPTIONAL |
|---|



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



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


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


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



getIncludeFileCache() : string | nullstaticRetrieve class file cache path
Returns| Type | Description |
|---|
| string | null | |



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


load(string $name, bool $throwExceptions = true) : string | falseLoad 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 |
|---|
| string | false | Class name of loaded class; false if $throwExceptions
if false and no class found |
Throws 


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


setIncludeFileCache(string $file) : voidstaticSet 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