mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-01-14 07:41:13 +01:00
65 lines
1.5 KiB
PHP
65 lines
1.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @see https://github.com/laminas/laminas-loader for the canonical source repository
|
|
* @copyright https://github.com/laminas/laminas-loader/blob/master/COPYRIGHT.md
|
|
* @license https://github.com/laminas/laminas-loader/blob/master/LICENSE.md New BSD License
|
|
*/
|
|
|
|
namespace Laminas\Loader;
|
|
|
|
use Traversable;
|
|
|
|
if (interface_exists('Laminas\Loader\SplAutoloader')) {
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* Defines an interface for classes that may register with the spl_autoload
|
|
* registry
|
|
*/
|
|
interface SplAutoloader
|
|
{
|
|
/**
|
|
* Constructor
|
|
*
|
|
* Allow configuration of the autoloader via the constructor.
|
|
*
|
|
* @param null|array|Traversable $options
|
|
*/
|
|
public function __construct($options = null);
|
|
|
|
/**
|
|
* Configure the autoloader
|
|
*
|
|
* In most cases, $options should be either an associative array or
|
|
* Traversable object.
|
|
*
|
|
* @param array|Traversable $options
|
|
* @return SplAutoloader
|
|
*/
|
|
public function setOptions($options);
|
|
|
|
/**
|
|
* Autoload a class
|
|
*
|
|
* @param $class
|
|
* @return mixed
|
|
* False [if unable to load $class]
|
|
* get_class($class) [if $class is successfully loaded]
|
|
*/
|
|
public function autoload($class);
|
|
|
|
/**
|
|
* Register the autoloader with spl_autoload registry
|
|
*
|
|
* Typically, the body of this will simply be:
|
|
* <code>
|
|
* spl_autoload_register(array($this, 'autoload'));
|
|
* </code>
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register();
|
|
}
|