API Documentation

Loader/Autoloader.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
Autoloader
version
$Id: Autoloader.php 22480 2010-06-21 17:37:20Z matthew $
Classes
Zend_Loader_Autoloader

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_Autoloader

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
Autoloader
uses
Zend_Loader_Autoloader
Properties
$_instance
$_autoloaders
$_defaultAutoloader
$_fallbackAutoloader
$_internalAutoloader
$_namespaces
$_namespaceAutoloaders
$_suppressNotFoundWarnings
$_zfPath
Methods
getInstance
resetInstance
autoload
setDefaultAutoloader
getDefaultAutoloader
setAutoloaders
getAutoloaders
getNamespaceAutoloaders
registerNamespace
unregisterNamespace
getRegisteredNamespaces
setZfPath
getZfPath
suppressNotFoundWarnings
setFallbackAutoloader
isFallbackAutoloader
getClassAutoloaders
unshiftAutoloader
pushAutoloader
removeAutoloader
__construct
_autoload
_setNamespaceAutoloaders
_getVersionPath
_getVersionType
_getAvailableVersions

Description

Autoloader stack and namespace autoloader

Properties

$_autoloaders

array $_autoloaders = 'array'

Details

$_autoloaders
array
Concrete autoloader callback implementations
visibility
protected
default
array
final
false
static
false

$_defaultAutoloader

array $_defaultAutoloader = 'array'

Details

$_defaultAutoloader
array
Default autoloader callback
visibility
protected
default
array
final
false
static
false

$_fallbackAutoloader

bool $_fallbackAutoloader = 'false'

Details

$_fallbackAutoloader
bool
Whether or not to act as a fallback autoloader
visibility
protected
default
false
final
false
static
false

$_instance

Zend_Loader_Autoloader $_instance = ''

Details

$_instance
Zend_Loader_Autoloader
Singleton instance
visibility
protected
default
final
false
static
true

$_internalAutoloader

array $_internalAutoloader = ''

Details

$_internalAutoloader
array
Callback for internal autoloader implementation
visibility
protected
default
final
false
static
false

$_namespaceAutoloaders

array $_namespaceAutoloaders = 'array'

Details

$_namespaceAutoloaders
array
Namespace-specific autoloaders
visibility
protected
default
array
final
false
static
false

$_namespaces

array $_namespaces = 'array'

Details

$_namespaces
array
Supported namespaces 'Zend' and 'ZendX' by default.
visibility
protected
default
array
final
false
static
false

$_suppressNotFoundWarnings

bool $_suppressNotFoundWarnings = 'false'

Details

$_suppressNotFoundWarnings
bool
Whether or not to suppress file not found warnings
visibility
protected
default
false
final
false
static
false

$_zfPath

null|string $_zfPath = ''

Details

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

Methods

__construct

__construct( ) : void

Constructor

Registers instance with spl_autoload stack

Details
visibility
protected
final
false
static
false

_autoload

_autoload( string $class ) : bool

Internal autoloader implementation

Arguments
$class
string
Output
bool
Details
visibility
protected
final
false
static
false

_getAvailableVersions

_getAvailableVersions( string $path, string $version ) : array

Get available versions for the version type requested

Arguments
$path
string
$version
string
Output
array
Details
visibility
protected
final
false
static
false

_getVersionPath

_getVersionPath( string $path, string $version ) : void

Retrieve the filesystem path for the requested ZF version

Arguments
$path
string
$version
string
Details
visibility
protected
final
false
static
false

_getVersionType

_getVersionType( string $version ) : string

Retrieve the ZF version type

Arguments
$version
string
Output
string
"latest", "major", "minor", or "specific"
Details
visibility
protected
final
false
static
false
throws
if version string contains too many dots

_setNamespaceAutoloaders

_setNamespaceAutoloaders( array $autoloaders, string $namespace ) : Zend_Loader_Autoloader

Set autoloaders for a specific namespace

Arguments
$autoloaders
array
$namespace
string
Details
visibility
protected
final
false
static
false

autoload

autoload( string $class ) : bool

Autoload a class

Arguments
$class
string
Output
bool
Details
visibility
public
final
false
static
true

getAutoloaders

getAutoloaders( ) : array

Get attached autoloader implementations

Output
array
Details
visibility
public
final
false
static
false

getClassAutoloaders

getClassAutoloaders( string $class ) : array

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.

Arguments
$class
string
Output
array
Array of autoloaders to use
Details
visibility
public
final
false
static
false

getDefaultAutoloader

getDefaultAutoloader( ) : string|array

Retrieve the default autoloader callback

Output
string|array
PHP Callback
Details
visibility
public
final
false
static
false

getInstance

getInstance( ) : Zend_Loader_Autoloader

Retrieve singleton instance

Details
visibility
public
final
false
static
true

getNamespaceAutoloaders

getNamespaceAutoloaders( string $namespace ) : array

Return all autoloaders for a given namespace

Arguments
$namespace
string
Output
array
Details
visibility
public
final
false
static
false

getRegisteredNamespaces

getRegisteredNamespaces( ) : array

Get a list of registered autoload namespaces

Output
array
Details
visibility
public
final
false
static
false

getZfPath

getZfPath( ) :
Details
visibility
public
final
false
static
false

isFallbackAutoloader

isFallbackAutoloader( ) : bool

Is this instance acting as a fallback autoloader?

Output
bool
Details
visibility
public
final
false
static
false

pushAutoloader

pushAutoloader( object|array|string $callback, string|array $namespace ) : Zend_Loader_Autoloader

Append an autoloader to the autoloader stack

Arguments
$callback
objectarraystring
PHP callback or Zend_Loader_Autoloader_Interface implementation
$namespace
stringarray
Specific namespace(s) under which to register callback
Details
visibility
public
final
false
static
false

registerNamespace

registerNamespace( string|array $namespace ) : Zend_Loader_Autoloader

Register a namespace to autoload

Arguments
$namespace
stringarray
Details
visibility
public
final
false
static
false

removeAutoloader

removeAutoloader( object|array|string $callback, null|string|array $namespace = null ) : Zend_Loader_Autoloader

Remove an autoloader from the autoloader stack

Arguments
$callback
objectarraystring
PHP callback or Zend_Loader_Autoloader_Interface implementation
$namespace
nullstringarray
Specific namespace(s) from which to remove autoloader
Details
visibility
public
final
false
static
false

resetInstance

resetInstance( ) : void

Reset the singleton instance

Details
visibility
public
final
false
static
true

setAutoloaders

setAutoloaders( array $autoloaders ) : Zend_Loader_Autoloader

Set several autoloader callbacks at once

Arguments
$autoloaders
array
Array of PHP callbacks (or Zend_Loader_Autoloader_Interface implementations) to act as autoloaders
Details
visibility
public
final
false
static
false

setDefaultAutoloader

setDefaultAutoloader( string|array $callback ) : void

Set the default autoloader implementation

Arguments
$callback
stringarray
PHP callback
Details
visibility
public
final
false
static
false

setFallbackAutoloader

setFallbackAutoloader( bool $flag ) : Zend_Loader_Autoloader

Indicate whether or not this autoloader should be a fallback autoloader

Arguments
$flag
bool
Details
visibility
public
final
false
static
false

setZfPath

setZfPath(  $spec,  $version = latest ) :
Arguments
$spec
$version
Details
visibility
public
final
false
static
false

suppressNotFoundWarnings

suppressNotFoundWarnings( null|bool $flag = null ) : bool|Zend_Loader_Autoloader

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

Arguments
$flag
nullbool
Output
bool|Zend_Loader_Autoloader
Returns boolean if no argument is passed, object instance otherwise
Details
visibility
public
final
false
static
false

unregisterNamespace

unregisterNamespace( string|array $namespace ) : Zend_Loader_Autoloader

Unload a registered autoload namespace

Arguments
$namespace
stringarray
Details
visibility
public
final
false
static
false

unshiftAutoloader

unshiftAutoloader( object|array|string $callback, string|array $namespace ) : Zend_Loader_Autoloader

Add an autoloader to the beginning of the stack

Arguments
$callback
objectarraystring
PHP callback or Zend_Loader_Autoloader_Interface implementation
$namespace
stringarray
Specific namespace(s) under which to register callback
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.