Moodle  2.2.1
http://www.collinsharper.com
Zend_Loader_Autoloader Class Reference

Public Member Functions

 setDefaultAutoloader ($callback)
 getDefaultAutoloader ()
 setAutoloaders (array $autoloaders)
 getAutoloaders ()
 getNamespaceAutoloaders ($namespace)
 registerNamespace ($namespace)
 unregisterNamespace ($namespace)
 getRegisteredNamespaces ()
 setZfPath ($spec, $version= 'latest')
 getZfPath ()
 suppressNotFoundWarnings ($flag=null)
 setFallbackAutoloader ($flag)
 isFallbackAutoloader ()
 getClassAutoloaders ($class)
 unshiftAutoloader ($callback, $namespace= '')
 pushAutoloader ($callback, $namespace= '')
 removeAutoloader ($callback, $namespace=null)

Static Public Member Functions

static getInstance ()
static resetInstance ()
static autoload ($class)

Protected Member Functions

 __construct ()
 _autoload ($class)
 _setNamespaceAutoloaders (array $autoloaders, $namespace= '')
 _getVersionPath ($path, $version)
 _getVersionType ($version)
 _getAvailableVersions ($path, $version)

Protected Attributes

 $_autoloaders = array()
 $_defaultAutoloader = array('Zend_Loader', 'loadClass')
 $_fallbackAutoloader = false
 $_internalAutoloader
 $_namespaces
 $_namespaceAutoloaders = array()
 $_suppressNotFoundWarnings = false
 $_zfPath

Static Protected Attributes

static $_instance

Detailed Description

Definition at line 35 of file Autoloader.php.


Constructor & Destructor Documentation

__construct ( ) [protected]

Constructor

Registers instance with spl_autoload stack

Returns:
void

Definition at line 453 of file Autoloader.php.


Member Function Documentation

_autoload ( class) [protected]

Internal autoloader implementation

Parameters:
string$class
Returns:
bool

Definition at line 465 of file Autoloader.php.

Here is the call graph for this function:

_getAvailableVersions ( path,
version 
) [protected]

Get available versions for the version type requested

Parameters:
string$path
string$version
Returns:
array

Definition at line 552 of file Autoloader.php.

Here is the caller graph for this function:

_getVersionPath ( path,
version 
) [protected]

Retrieve the filesystem path for the requested ZF version

Parameters:
string$path
string$version
Returns:
void

Definition at line 501 of file Autoloader.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_getVersionType ( version) [protected]

Retrieve the ZF version type

Parameters:
string$version
Returns:
string "latest", "major", "minor", or "specific"
Exceptions:
Zend_Loader_Exceptionif version string contains too many dots

Definition at line 525 of file Autoloader.php.

Here is the caller graph for this function:

_setNamespaceAutoloaders ( array autoloaders,
namespace = '' 
) [protected]

Set autoloaders for a specific namespace

Parameters:
array$autoloaders
string$namespace
Returns:
Zend_Loader_Autoloader

Definition at line 487 of file Autoloader.php.

Here is the caller graph for this function:

static autoload ( class) [static]

Autoload a class

Parameters:
string$class
Returns:
bool

Definition at line 114 of file Autoloader.php.

Here is the call graph for this function:

Get attached autoloader implementations

Returns:
array

Definition at line 180 of file Autoloader.php.

Here is the caller graph for this function:

getClassAutoloaders ( class)

Get autoloaders to use when matching class

Determines if the class matches a registered namespace, and, if so, returns only the autoloaders for that namespace. Otherwise, it returns all non-namespaced autoloaders.

Parameters:
string$class
Returns:
array Array of autoloaders to use

Definition at line 327 of file Autoloader.php.

Here is the call graph for this function:

Retrieve the default autoloader callback

Returns:
string|array PHP Callback

Definition at line 158 of file Autoloader.php.

Here is the caller graph for this function:

static getInstance ( ) [static]

Retrieve singleton instance

Returns:
Zend_Loader_Autoloader

Definition at line 90 of file Autoloader.php.

Here is the caller graph for this function:

getNamespaceAutoloaders ( namespace)

Return all autoloaders for a given namespace

Parameters:
string$namespace
Returns:
array

Definition at line 191 of file Autoloader.php.

Here is the caller graph for this function:

Get a list of registered autoload namespaces

Returns:
array

Definition at line 249 of file Autoloader.php.

Here is the caller graph for this function:

getZfPath ( )

Definition at line 275 of file Autoloader.php.

Is this instance acting as a fallback autoloader?

Returns:
bool

Definition at line 312 of file Autoloader.php.

Here is the caller graph for this function:

pushAutoloader ( callback,
namespace = '' 
)

Append an autoloader to the autoloader stack

Parameters:
object | array | string$callbackPHP callback or Zend_Loader_Autoloader_Interface implementation
string | array$namespaceSpecific namespace(s) under which to register callback
Returns:
Zend_Loader_Autoloader

Definition at line 394 of file Autoloader.php.

Here is the call graph for this function:

registerNamespace ( namespace)

Register a namespace to autoload

Parameters:
string | array$namespace
Returns:
Zend_Loader_Autoloader

Definition at line 206 of file Autoloader.php.

removeAutoloader ( callback,
namespace = null 
)

Remove an autoloader from the autoloader stack

Parameters:
object | array | string$callbackPHP callback or Zend_Loader_Autoloader_Interface implementation
null | string | array$namespaceSpecific namespace(s) from which to remove autoloader
Returns:
Zend_Loader_Autoloader

Definition at line 417 of file Autoloader.php.

Here is the call graph for this function:

static resetInstance ( ) [static]

Reset the singleton instance

Returns:
void

Definition at line 103 of file Autoloader.php.

setAutoloaders ( array autoloaders)

Set several autoloader callbacks at once

Parameters:
array$autoloadersArray of PHP callbacks (or Zend_Loader_Autoloader_Interface implementations) to act as autoloaders
Returns:
Zend_Loader_Autoloader

Definition at line 169 of file Autoloader.php.

Here is the caller graph for this function:

setDefaultAutoloader ( callback)

Set the default autoloader implementation

Parameters:
string | array$callbackPHP callback
Returns:
void

Definition at line 143 of file Autoloader.php.

setFallbackAutoloader ( flag)

Indicate whether or not this autoloader should be a fallback autoloader

Parameters:
bool$flag
Returns:
Zend_Loader_Autoloader

Definition at line 301 of file Autoloader.php.

setZfPath ( spec,
version = 'latest' 
)

Definition at line 254 of file Autoloader.php.

Here is the call graph for this function:

suppressNotFoundWarnings ( flag = null)

Get or set the value of the "suppress not found warnings" flag

Parameters:
null | bool$flag
Returns:
bool|Zend_Loader_Autoloader Returns boolean if no argument is passed, object instance otherwise

Definition at line 286 of file Autoloader.php.

Here is the caller graph for this function:

unregisterNamespace ( namespace)

Unload a registered autoload namespace

Parameters:
string | array$namespace
Returns:
Zend_Loader_Autoloader

Definition at line 228 of file Autoloader.php.

unshiftAutoloader ( callback,
namespace = '' 
)

Add an autoloader to the beginning of the stack

Parameters:
object | array | string$callbackPHP callback or Zend_Loader_Autoloader_Interface implementation
string | array$namespaceSpecific namespace(s) under which to register callback
Returns:
Zend_Loader_Autoloader

Definition at line 371 of file Autoloader.php.

Here is the call graph for this function:


Field Documentation

$_autoloaders = array() [protected]

Definition at line 45 of file Autoloader.php.

$_defaultAutoloader = array('Zend_Loader', 'loadClass') [protected]

Definition at line 50 of file Autoloader.php.

$_fallbackAutoloader = false [protected]

Definition at line 55 of file Autoloader.php.

$_instance [static, protected]

Definition at line 40 of file Autoloader.php.

$_internalAutoloader [protected]

Definition at line 60 of file Autoloader.php.

$_namespaceAutoloaders = array() [protected]

Definition at line 73 of file Autoloader.php.

$_namespaces [protected]
Initial value:
 array(
        'Zend_'  => true,
        'ZendX_' => true,
    )

Definition at line 65 of file Autoloader.php.

$_suppressNotFoundWarnings = false [protected]

Definition at line 78 of file Autoloader.php.

$_zfPath [protected]

Definition at line 83 of file Autoloader.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations