File indexing completed on 2024-05-12 06:02:43
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Loader 0017 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0018 * @license http://framework.zend.com/license/new-bsd New BSD License 0019 */ 0020 0021 if (interface_exists('Zend_Loader_SplAutoloader')) return; 0022 0023 /** 0024 * Defines an interface for classes that may register with the spl_autoload 0025 * registry 0026 * 0027 * @package Zend_Loader 0028 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0029 * @license http://framework.zend.com/license/new-bsd New BSD License 0030 */ 0031 interface Zend_Loader_SplAutoloader 0032 { 0033 /** 0034 * Constructor 0035 * 0036 * Allow configuration of the autoloader via the constructor. 0037 * 0038 * @param null|array|Traversable $options 0039 * @return void 0040 */ 0041 public function __construct($options = null); 0042 0043 /** 0044 * Configure the autoloader 0045 * 0046 * In most cases, $options should be either an associative array or 0047 * Traversable object. 0048 * 0049 * @param array|Traversable $options 0050 * @return SplAutoloader 0051 */ 0052 public function setOptions($options); 0053 0054 /** 0055 * Autoload a class 0056 * 0057 * @param $class 0058 * @return mixed 0059 * False [if unable to load $class] 0060 * get_class($class) [if $class is successfully loaded] 0061 */ 0062 public function autoload($class); 0063 0064 /** 0065 * Register the autoloader with spl_autoload registry 0066 * 0067 * Typically, the body of this will simply be: 0068 * <code> 0069 * spl_autoload_register(array($this, 'autoload')); 0070 * </code> 0071 * 0072 * @return void 0073 */ 0074 public function register(); 0075 }