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

 Methods

Constructor

__construct(null | array | \Traversable $options) 

Allow configuration of the autoloader via the constructor.

Parameters

$options

nullarray\Traversable

Autoload a class

autoload($class) : mixed

Parameters

$class

Returns

mixedFalse [if unable to load $class] get_class($class) [if $class is successfully loaded]

Register the autoloader with spl_autoload registry

register() : void

Typically, the body of this will simply be:

spl_autoload_register(array($this, 'autoload'));

Configure the autoloader

setOptions(array | \Traversable $options) : \Zend\Loader\SplAutoloader

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

Parameters

$options

array\Traversable

Returns