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
[email protected] 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 = null
Whether to use a statically named registry for loading plugins
Default valuenull
Details- Type
- string | null
Methods
__construct(array $prefixToPaths = array(), string $staticRegistryName = null) : void
ParametersName | Type | Description |
---|
$prefixToPaths | array | |
---|
$staticRegistryName | string | OPTIONAL |
---|
_appendIncFile(string $incFile) : void
staticAppend an include_once statement to the class file cache
ParametersName | Type | Description |
---|
$incFile | string | |
---|
_formatPrefix(string $prefix) : string
Format prefix for internal use
ParametersName | Type | Description |
---|
$prefix | string | |
---|
Returns addPrefixPath(string $prefix, string $path) : \Zend_Loader_PluginLoader
Add prefixed paths to the registry of paths
ParametersName | Type | Description |
---|
$prefix | string | |
---|
$path | string | |
---|
Returns getClassName(string $name) : string | false
Return full class name for a named plugin
ParametersName | Type | Description |
---|
$name | string | |
---|
ReturnsType | Description |
---|
string | false | False if class not found, class name otherwise |
getIncludeFileCache() : string | null
staticRetrieve class file cache path
ReturnsType | Description |
---|
string | null | |
isLoaded(string $name) : \Zend_Loader_PluginLoader
Whether or not a Plugin by a specific name is loaded
ParametersName | Type | Description |
---|
$name | string | |
---|
Returns load(string $name, bool $throwExceptions = true) : string | false
Load a plugin via the name provided
ParametersName | Type | Description |
---|
$name | string | |
---|
$throwExceptions | bool | Whether or not to throw exceptions if the
class is not resolved |
---|
ReturnsType | 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_PluginLoader
Remove a prefix (or prefixed-path) from the registry
ParametersName | 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.
ParametersName | Type | Description |
---|
$file | string | |
---|
Throws