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.
Generic plugin class loader

array
$_loadedPluginPaths= 'array()'
Instance loaded plugin paths
array()
Details
array
$_staticLoadedPluginPaths= 'array()'
Statically loaded plugin path mappings
array()
Details
array
$_staticLoadedPlugins= 'array()'
Statically loaded plugins
array()
Details
array
$_staticPrefixToPaths= 'array()'
Static registry property
array()
Details
__construct(
array $prefixToPaths
=
array(), string $staticRegistryName
=
null
)
:
void
Constructor
Name | Type | Description |
---|---|---|
$prefixToPaths | array | |
$staticRegistryName | string | OPTIONAL |

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

_formatName(
string $name
)
:
string
Normalize plugin name
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
string |

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

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

clearPaths(
string $prefix
=
null
)
:
bool
Clear path stack
Name | Type | Description |
---|---|---|
$prefix | string |
Type | Description |
---|---|
bool | False only if $prefix does not exist |

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

getClassPath(
mixed $name
)
:
string|false
Get path to plugin class
Name | Type | Description |
---|---|---|
$name | mixed |
Type | Description |
---|---|
string|false | False if not found |

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

getPaths(
string $prefix
=
null
)
:
false|array
Get path stack
Name | Type | Description |
---|---|---|
$prefix | string |
Type | Description |
---|---|
false|array | False if prefix does not exist, array otherwise |

isLoaded(
string $name
)
:
\Zend_Loader_PluginLoader
Whether or not a Plugin by a specific name is loaded

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

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

setIncludeFileCache(
string $file
)
:
void
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.
Name | Type | Description |
---|---|---|
$file | string |
Exception | Description |
---|---|
\Zend_Loader_PluginLoader_Exception | if file is not writeable or path does not exist |