1 | <?php |
||
39 | class SplClassLoader |
||
40 | { |
||
41 | private $_fileExtension = '.php'; |
||
42 | private $_namespace; |
||
43 | private $_includePath; |
||
44 | private $_namespaceSeparator = '\\'; |
||
45 | |||
46 | /** |
||
47 | * Creates a new <tt>SplClassLoader</tt> that loads classes of the |
||
48 | * specified namespace. |
||
49 | * |
||
50 | * @param string $ns The namespace to use. |
||
51 | */ |
||
52 | public function __construct($ns = null, $includePath = null) |
||
57 | |||
58 | /** |
||
59 | * Sets the namespace separator used by classes in the namespace of this class loader. |
||
60 | * |
||
61 | * @param string $sep The separator to use. |
||
62 | */ |
||
63 | public function setNamespaceSeparator($sep) |
||
67 | |||
68 | /** |
||
69 | * Gets the namespace seperator used by classes in the namespace of this class loader. |
||
70 | * |
||
71 | * @return void |
||
72 | */ |
||
73 | public function getNamespaceSeparator() |
||
77 | |||
78 | /** |
||
79 | * Sets the base include path for all class files in the namespace of this class loader. |
||
80 | * |
||
81 | * @param string $includePath |
||
82 | */ |
||
83 | public function setIncludePath($includePath) |
||
87 | |||
88 | /** |
||
89 | * Gets the base include path for all class files in the namespace of this class loader. |
||
90 | * |
||
91 | * @return string $includePath |
||
92 | */ |
||
93 | public function getIncludePath() |
||
97 | |||
98 | /** |
||
99 | * Sets the file extension of class files in the namespace of this class loader. |
||
100 | * |
||
101 | * @param string $fileExtension |
||
102 | */ |
||
103 | public function setFileExtension($fileExtension) |
||
107 | |||
108 | /** |
||
109 | * Gets the file extension of class files in the namespace of this class loader. |
||
110 | * |
||
111 | * @return string $fileExtension |
||
112 | */ |
||
113 | public function getFileExtension() |
||
117 | |||
118 | /** |
||
119 | * Installs this class loader on the SPL autoload stack. |
||
120 | */ |
||
121 | public function register() |
||
125 | |||
126 | /** |
||
127 | * Uninstalls this class loader from the SPL autoloader stack. |
||
128 | */ |
||
129 | public function unregister() |
||
133 | |||
134 | /** |
||
135 | * Loads the given class or interface. |
||
136 | * |
||
137 | * @param string $className The name of the class to load. |
||
138 | * @return void |
||
139 | */ |
||
140 | 6 | public function loadClass($className) |
|
157 | } |