Zend Framework  3.0
Public Member Functions | List of all members
SplAutoloader Interface Reference

Defines an interface for classes that may register with the spl_autoload registry. More...

Public Member Functions

 __construct ($options=null)
 Constructor.
 
 setOptions ($options)
 Configure the autoloader.
 
 autoload ($class)
 Autoload a class.
 
 register ()
 Register the autoloader with spl_autoload registry.
 

Detailed Description

Defines an interface for classes that may register with the spl_autoload registry.

Constructor & Destructor Documentation

__construct (   $options = null)

Constructor.

Allow configuration of the autoloader via the constructor.

Parameters
null | array | Traversable$options

Implemented in ModuleAutoloader, StandardAutoloader, and ClassMapAutoloader.

Member Function Documentation

autoload (   $class)

Autoload a class.

Parameters
$class
Returns
mixed False [if unable to load $class] get_class($class) [if $class is successfully loaded]

Implemented in StandardAutoloader, ModuleAutoloader, and ClassMapAutoloader.

register ( )

Register the autoloader with spl_autoload registry.

Typically, the body of this will simply be: spl_autoload_register(array($this, 'autoload'));

Returns
void

Implemented in ModuleAutoloader, StandardAutoloader, and ClassMapAutoloader.

setOptions (   $options)

Configure the autoloader.

In most cases, $options should be either an associative array or Traversable object.

Parameters
array | Traversable$options
Returns
SplAutoloader

Implemented in ModuleAutoloader, StandardAutoloader, and ClassMapAutoloader.