API Documentation

Loader/PluginLoader.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Loader
subpackage
PluginLoader
version
$Id: PluginLoader.php 22604 2010-07-17 00:14:06Z ramon $
Classes
Zend_Loader_PluginLoader

Description

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.

Zend_Loader_PluginLoader

Implements
Zend_Loader_PluginLoader_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Loader
subpackage
PluginLoader
Properties
$_includeFileCache
$_loadedPluginPaths
$_loadedPlugins
$_prefixToPaths
$_staticLoadedPluginPaths
$_staticLoadedPlugins
$_staticPrefixToPaths
$_useStaticRegistry
Methods
__construct
_formatPrefix
addPrefixPath
getPaths
clearPaths
removePrefixPath
_formatName
isLoaded
getClassName
getClassPath
load
setIncludeFileCache
getIncludeFileCache
_appendIncFile

Description

Generic plugin class loader

Properties

$_includeFileCache

string $_includeFileCache = ''

Class map cache file

Details

$_includeFileCache
string
visibility
protected
default
final
false
static
true

$_loadedPluginPaths

array $_loadedPluginPaths = 'array'

Instance loaded plugin paths

Details

$_loadedPluginPaths
array
visibility
protected
default
array
final
false
static
false

$_loadedPlugins

array $_loadedPlugins = 'array'

Instance loaded plugins

Details

$_loadedPlugins
array
visibility
protected
default
array
final
false
static
false

$_prefixToPaths

array $_prefixToPaths = 'array'

Instance registry property

Details

$_prefixToPaths
array
visibility
protected
default
array
final
false
static
false

$_staticLoadedPluginPaths

array $_staticLoadedPluginPaths = 'array'

Statically loaded plugin path mappings

Details

$_staticLoadedPluginPaths
array
visibility
protected
default
array
final
false
static
true

$_staticLoadedPlugins

array $_staticLoadedPlugins = 'array'

Statically loaded plugins

Details

$_staticLoadedPlugins
array
visibility
protected
default
array
final
false
static
true

$_staticPrefixToPaths

array $_staticPrefixToPaths = 'array'

Static registry property

Details

$_staticPrefixToPaths
array
visibility
protected
default
array
final
false
static
true

$_useStaticRegistry

string|null $_useStaticRegistry = 'null'

Whether to use a statically named registry for loading plugins

Details

$_useStaticRegistry
string|null
visibility
protected
default
null
final
false
static
false

Methods

__construct

__construct( array $prefixToPaths = array, string $staticRegistryName = null ) :

Constructor

Arguments
$prefixToPaths
array
$staticRegistryName
string
OPTIONAL
Details
visibility
public
final
false
static
false

_appendIncFile

_appendIncFile( string $incFile ) : void

Append an include_once statement to the class file cache

Arguments
$incFile
string
Details
visibility
protected
final
false
static
true

_formatName

_formatName( string $name ) : string

Normalize plugin name

Arguments
$name
string
Output
string
Details
visibility
protected
final
false
static
false

_formatPrefix

_formatPrefix( string $prefix ) : string

Format prefix for internal use

Arguments
$prefix
string
Output
string
Details
visibility
protected
final
false
static
false

addPrefixPath

addPrefixPath( string $prefix, string $path ) : Zend_Loader_PluginLoader

Add prefixed paths to the registry of paths

Arguments
$prefix
string
$path
string
Details
visibility
public
final
false
static
false

clearPaths

clearPaths( string $prefix = null ) : bool

Clear path stack

Arguments
$prefix
string
Output
bool
False only if $prefix does not exist
Details
visibility
public
final
false
static
false

getClassName

getClassName( string $name ) : string|false

Return full class name for a named plugin

Arguments
$name
string
Output
string|false
False if class not found, class name otherwise
Details
visibility
public
final
false
static
false

getClassPath

getClassPath( mixed $name ) : string|false

Get path to plugin class

Arguments
$name
mixed
Output
string|false
False if not found
Details
visibility
public
final
false
static
false

getIncludeFileCache

getIncludeFileCache( ) : string|null

Retrieve class file cache path

Output
string|null
Details
visibility
public
final
false
static
true

getPaths

getPaths( string $prefix = null ) : false|array

Get path stack

Arguments
$prefix
string
Output
false|array
False if prefix does not exist, array otherwise
Details
visibility
public
final
false
static
false

isLoaded

isLoaded( string $name ) : Zend_Loader_PluginLoader

Whether or not a Plugin by a specific name is loaded

Arguments
$name
string
Details
visibility
public
final
false
static
false

load

load( string $name, bool $throwExceptions = true ) : string|false

Load a plugin via the name provided

Arguments
$name
string
$throwExceptions
bool
Whether or not to throw exceptions if the class is not resolved
Output
string|false
Class name of loaded class; false if $throwExceptions if false and no class found
Details
visibility
public
final
false
static
false
throws
if class not found

removePrefixPath

removePrefixPath( string $prefix, string $path = null ) : Zend_Loader_PluginLoader

Remove a prefix (or prefixed-path) from the registry

Arguments
$prefix
string
$path
string
OPTIONAL
Details
visibility
public
final
false
static
false

setIncludeFileCache

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.

Arguments
$file
string
Details
visibility
public
final
false
static
true
throws
if file is not writeable or path does not exist
Documentation was generated by DocBlox.