Overview

Packages

  • Auth
  • Config
  • Controller
  • Date
  • Db
  • Feed
    • Abstract
    • Writers
  • File
    • Decorator
  • Form
    • Element
  • Image
  • Log
    • Writer
  • Net
    • Exception
    • REST
  • None
  • PHP
  • PHPMailer
  • Session
  • Util
  • Validate
    • Validator
  • Zend
    • Db
      • Adapter
      • Expr
      • Profiler
      • Select
      • Statement
      • Table
    • Loader
      • Autoloader
      • PluginLoader
    • Registry

Classes

  • Zend_Loader_Autoloader
  • Zend_Loader_Autoloader_Resource

Interfaces

  • Zend_Loader_Autoloader_Interface
  • Overview
  • Package
  • Class
  • Tree

Class Zend_Loader_Autoloader

Autoloader stack and namespace autoloader

Package: Zend\Loader\Autoloader
Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: New BSD License
Uses: Zend_Loader_Autoloader
Used by: Zend_Loader_Autoloader
Located at Zend/Loader/Autoloader.php
Methods summary
public static Zend_Loader_Autoloader
# getInstance( )

Retrieve singleton instance

Retrieve singleton instance

Returns

Zend_Loader_Autoloader
public static
# resetInstance( )

Reset the singleton instance

Reset the singleton instance

public static boolean
# autoload( string $class )

Autoload a class

Autoload a class

Parameters

$class
string

Returns

boolean
public
# setDefaultAutoloader( string|array $callback )

Set the default autoloader implementation

Set the default autoloader implementation

Parameters

$callback
string|array
PHP callback
public string|array
# getDefaultAutoloader( )

Retrieve the default autoloader callback

Retrieve the default autoloader callback

Returns

string|array
PHP Callback
public Zend_Loader_Autoloader
# setAutoloaders( array $autoloaders )

Set several autoloader callbacks at once

Set several autoloader callbacks at once

Parameters

$autoloaders
array
Array of PHP callbacks (or Zend_Loader_Autoloader_Interface implementations) to act as autoloaders

Returns

Zend_Loader_Autoloader
public array
# getAutoloaders( )

Get attached autoloader implementations

Get attached autoloader implementations

Returns

array
public array
# getNamespaceAutoloaders( string $namespace )

Return all autoloaders for a given namespace

Return all autoloaders for a given namespace

Parameters

$namespace
string

Returns

array
public Zend_Loader_Autoloader
# registerNamespace( string|array $namespace )

Register a namespace to autoload

Register a namespace to autoload

Parameters

$namespace
string|array

Returns

Zend_Loader_Autoloader
public Zend_Loader_Autoloader
# unregisterNamespace( string|array $namespace )

Unload a registered autoload namespace

Unload a registered autoload namespace

Parameters

$namespace
string|array

Returns

Zend_Loader_Autoloader
public array
# getRegisteredNamespaces( )

Get a list of registered autoload namespaces

Get a list of registered autoload namespaces

Returns

array
public
# setZfPath( $spec, $version = 'latest' )
public
# getZfPath( )
public boolean|Zend_Loader_Autoloader
# suppressNotFoundWarnings( null|boolean $flag = null )

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

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

Parameters

$flag
null|boolean

Returns

boolean|Zend_Loader_Autoloader
Returns boolean if no argument is passed, object instance otherwise
public Zend_Loader_Autoloader
# setFallbackAutoloader( boolean $flag )

Indicate whether or not this autoloader should be a fallback autoloader

Indicate whether or not this autoloader should be a fallback autoloader

Parameters

$flag
boolean

Returns

Zend_Loader_Autoloader
public boolean
# isFallbackAutoloader( )

Is this instance acting as a fallback autoloader?

Is this instance acting as a fallback autoloader?

Returns

boolean
public array
# getClassAutoloaders( string $class )

Get autoloaders to use when matching 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

$class
string

Returns

array
Array of autoloaders to use
public Zend_Loader_Autoloader
# unshiftAutoloader( object|array|string $callback, string|array $namespace = '' )

Add an autoloader to the beginning of the stack

Add an autoloader to the beginning of the stack

Parameters

$callback
object|array|string
PHP callback or Zend_Loader_Autoloader_Interface implementation
$namespace
string|array
Specific namespace(s) under which to register callback

Returns

Zend_Loader_Autoloader
public Zend_Loader_Autoloader
# pushAutoloader( object|array|string $callback, string|array $namespace = '' )

Append an autoloader to the autoloader stack

Append an autoloader to the autoloader stack

Parameters

$callback
object|array|string
PHP callback or Zend_Loader_Autoloader_Interface implementation
$namespace
string|array
Specific namespace(s) under which to register callback

Returns

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

Remove an autoloader from the autoloader stack

Remove an autoloader from the autoloader stack

Parameters

$callback
object|array|string
PHP callback or Zend_Loader_Autoloader_Interface implementation
$namespace
null|string|array
Specific namespace(s) from which to remove autoloader

Returns

Zend_Loader_Autoloader
protected
# __construct( )

Constructor

Constructor

Registers instance with spl_autoload stack

protected boolean
# _autoload( string $class )

Internal autoloader implementation

Internal autoloader implementation

Parameters

$class
string

Returns

boolean
protected Zend_Loader_Autoloader
# _setNamespaceAutoloaders( array $autoloaders, string $namespace = '' )

Set autoloaders for a specific namespace

Set autoloaders for a specific namespace

Parameters

$autoloaders
array
$namespace
string

Returns

Zend_Loader_Autoloader
protected
# _getVersionPath( string $path, string $version )

Retrieve the filesystem path for the requested ZF version

Retrieve the filesystem path for the requested ZF version

Parameters

$path
string
$version
string
protected string
# _getVersionType( string $version )

Retrieve the ZF version type

Retrieve the ZF version type

Parameters

$version
string

Returns

string
"latest", "major", "minor", or "specific"

Throws

Zend_Loader_Exception
if version string contains too many dots
protected array
# _getAvailableVersions( string $path, string $version )

Get available versions for the version type requested

Get available versions for the version type requested

Parameters

$path
string
$version
string

Returns

array
Properties summary
protected static Zend_Loader_Autoloader $_instance
#

Singleton instance

Singleton instance

protected array $_autoloaders array()
#

Concrete autoloader callback implementations

Concrete autoloader callback implementations

protected array $_defaultAutoloader array('Zend_Loader', 'loadClass')
#

Default autoloader callback

Default autoloader callback

protected boolean $_fallbackAutoloader false
#

Whether or not to act as a fallback autoloader

Whether or not to act as a fallback autoloader

protected array $_internalAutoloader
#

Callback for internal autoloader implementation

Callback for internal autoloader implementation

protected array $_namespaces array( 'Zend_' => true, 'ZendX_' => true, )
#

Supported namespaces 'Zend' and 'ZendX' by default.

Supported namespaces 'Zend' and 'ZendX' by default.

protected array $_namespaceAutoloaders array()
#

Namespace-specific autoloaders

Namespace-specific autoloaders

protected boolean $_suppressNotFoundWarnings false
#

Whether or not to suppress file not found warnings

Whether or not to suppress file not found warnings

protected null|string $_zfPath
#
Pry Framework API documentation generated by ApiGen 2.6.1