reference/spl/functions/spl-autoload.xml
450d2085da9bba991afb9c68d9c94fc06a67a8a7
...
...
@@ -9,14 +9,14 @@
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
11
<type>void</type><methodname>spl_autoload</methodname>
12
-
<methodparam><type>string</type><parameter>class_name</parameter></methodparam>
13
-
<methodparam choice="opt"><type>string</type><parameter>file_extensions</parameter><initializer>spl_autoload_extensions()</initializer></methodparam>
12
+
<methodparam><type>string</type><parameter>class</parameter></methodparam>
13
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>file_extensions</parameter><initializer>&null;</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
This function is intended to be used as a default implementation for
17
17
<function>__autoload</function>. If nothing else is specified and
18
18
<function>spl_autoload_register</function> is
19
-
called without any parameters then this function will be used for any
19
+
called without any parameters then <function>spl_autoload</function> will be used for any
20
20
later call to <function>__autoload</function>.
21
21
</para>
22
22
</refsect1>
...
...
@@ -26,10 +26,10 @@
26
26
<para>
27
27
<variablelist>
28
28
<varlistentry>
29
-
<term><parameter>class_name</parameter></term>
29
+
<term><parameter>class</parameter></term>
30
30
<listitem>
31
31
<para>
32
-
The lowercased name of the class (and namespace) being instantiated.
32
+
The name of the class (and namespace) being instantiated.
33
33
</para>
34
34
</listitem>
35
35
</varlistentry>
...
...
@@ -37,9 +37,9 @@
37
37
<term><parameter>file_extensions</parameter></term>
38
38
<listitem>
39
39
<para>
40
-
By default it checks all include paths to
40
+
By default it checks all <link linkend="ini.include-path">include_path</link>s to
41
41
contain filenames built up by the lowercase class name appended by the
42
-
filename extensions .inc and .php.
42
+
filename extensions <literal>.inc</literal> and <literal>.php</literal>.
43
43
</para>
44
44
</listitem>
45
45
</varlistentry>
...
...
@@ -54,8 +54,39 @@
54
54
</para>
55
55
</refsect1>
56
56

57
-
</refentry>
57
+
<refsect1 role="errors">
58
+
&reftitle.errors;
59
+
<para>
60
+
Throws <classname>LogicException</classname> when the class is not found
61
+
and there are no other autoloaders registered.
62
+
</para>
63
+
</refsect1>
58
64
65
+
<refsect1 role="changelog">
66
+
&reftitle.changelog;
67
+
<para>
68
+
<informaltable>
69
+
<tgroup cols="2">
70
+
<thead>
71
+
<row>
72
+
<entry>&Version;</entry>
73
+
<entry>&Description;</entry>
74
+
</row>
75
+
</thead>
76
+
<tbody>
77
+
<row>
78
+
<entry>8.0.0</entry>
79
+
<entry>
80
+
<parameter>file_extensions</parameter> is now nullable.
81
+
</entry>
82
+
</row>
83
+
</tbody>
84
+
</tgroup>
85
+
</informaltable>
86
+
</para>
87
+
</refsect1>
88
+
89
+
</refentry>
59
90
<!-- Keep this comment at the end of the file
60
91
Local variables:
61
92
mode: sgml
62
93