Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
40 | PointedEar | 1 | <?php |
2 | /** |
||
3 | * Zend Framework (http://framework.zend.com/) |
||
4 | * |
||
5 | * @link http://github.com/zendframework/zf2 for the canonical source repository |
||
6 | * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) |
||
7 | * @license http://framework.zend.com/license/new-bsd New BSD License |
||
8 | */ |
||
9 | |||
10 | namespace Zend\Loader; |
||
11 | |||
12 | use Traversable; |
||
13 | |||
14 | if (interface_exists('Zend\Loader\SplAutoloader')) return; |
||
15 | |||
16 | /** |
||
17 | * Defines an interface for classes that may register with the spl_autoload |
||
18 | * registry |
||
19 | */ |
||
20 | interface SplAutoloader |
||
21 | { |
||
22 | /** |
||
23 | * Constructor |
||
24 | * |
||
25 | * Allow configuration of the autoloader via the constructor. |
||
26 | * |
||
27 | * @param null|array|Traversable $options |
||
28 | */ |
||
29 | public function __construct($options = null); |
||
30 | |||
31 | /** |
||
32 | * Configure the autoloader |
||
33 | * |
||
34 | * In most cases, $options should be either an associative array or |
||
35 | * Traversable object. |
||
36 | * |
||
37 | * @param array|Traversable $options |
||
38 | * @return SplAutoloader |
||
39 | */ |
||
40 | public function setOptions($options); |
||
41 | |||
42 | /** |
||
43 | * Autoload a class |
||
44 | * |
||
45 | * @param $class |
||
46 | * @return mixed |
||
47 | * False [if unable to load $class] |
||
48 | * get_class($class) [if $class is successfully loaded] |
||
49 | */ |
||
50 | public function autoload($class); |
||
51 | |||
52 | /** |
||
53 | * Register the autoloader with spl_autoload registry |
||
54 | * |
||
55 | * Typically, the body of this will simply be: |
||
56 | * <code> |
||
57 | * spl_autoload_register(array($this, 'autoload')); |
||
58 | * </code> |
||
59 | * |
||
60 | * @return void |
||
61 | */ |
||
62 | public function register(); |
||
63 | } |