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

package Zend_Loader
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct(null|array|\Traversable $options = null) : void

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) : \SplAutoloader

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

Parameters

$options

array\Traversable

Returns

\SplAutoloader