reference/reflection/reflectionclass/construct.xml
d52f1e69082873b36f133ecda1ecd2a87a4df4ad
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="reflectionclass.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>ReflectionClass::__construct</refname>
...
...
@@ -9,16 +8,13 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<constructorsynopsis role="ReflectionClass">
13
12
<modifier>public</modifier> <methodname>ReflectionClass::__construct</methodname>
14
-
<methodparam><type>mixed</type><parameter>argument</parameter></methodparam>
15
-
</methodsynopsis>
13
+
<methodparam><type class="union"><type>object</type><type>string</type></type><parameter>objectOrClass</parameter></methodparam>
14
+
</constructorsynopsis>
16
15
<para>
17
16
Constructs a new <classname>ReflectionClass</classname> object.
18
17
</para>
19
-

20
-
&warn.undocumented.func;
21
-

22
18
</refsect1>
23
19

24
20
<refsect1 role="parameters">
...
...
@@ -26,7 +22,7 @@
26
22
<para>
27
23
<variablelist>
28
24
<varlistentry>
29
-
<term><parameter>argument</parameter></term>
25
+
<term><parameter>objectOrClass</parameter></term>
30
26
<listitem>
31
27
<para>
32
28
Either a <type>string</type> containing the name of the class to
...
...
@@ -38,10 +34,10 @@
38
34
</para>
39
35
</refsect1>
40
36

41
-
<refsect1 role="returnvalues">
42
-
&reftitle.returnvalues;
37
+
<refsect1 role="errors">
38
+
&reftitle.errors;
43
39
<para>
44
-
&return.void;
40
+
Throws <classname>ReflectionException</classname> if the class to reflect does not exist.
45
41
</para>
46
42
</refsect1>
47
43

...
...
@@ -53,14 +49,15 @@
53
49
<programlisting role="php">
54
50
<![CDATA[
55
51
<?php
56
-
Reflection::export(new ReflectionClass('Exception'));
52
+
$reflection = new ReflectionClass('Exception');
53
+
echo $reflection;
57
54
?>
58
55
]]>
59
56
</programlisting>
60
57
&example.outputs.similar;
61
58
<screen>
62
59
<![CDATA[
63
-
Class [ <internal:Core> class Exception ] {
60
+
Class [ <internal:Core> class Exception implements Stringable, Throwable ] {
64
61

65
62
- Constants [0] {
66
63
}
...
...
@@ -72,50 +69,92 @@ Class [ <internal:Core> class Exception ] {
72
69
}
73
70

74
71
- Properties [7] {
75
-
Property [ <default> protected $message ]
76
-
Property [ <default> private $string ]
77
-
Property [ <default> protected $code ]
78
-
Property [ <default> protected $file ]
79
-
Property [ <default> protected $line ]
80
-
Property [ <default> private $trace ]
81
-
Property [ <default> private $previous ]
72
+
Property [ protected $message = '' ]
73
+
Property [ private string $string = '' ]
74
+
Property [ protected $code = 0 ]
75
+
Property [ protected string $file = '' ]
76
+
Property [ protected int $line = 0 ]
77
+
Property [ private array $trace = [] ]
78
+
Property [ private ?Throwable $previous = NULL ]
82
79
}
83
80

84
-
- Methods [10] {
85
-
Method [ <internal:Core> final private method __clone ] {
81
+
- Methods [11] {
82
+
Method [ <internal:Core> private method __clone ] {
83
+

84
+
- Parameters [0] {
85
+
}
86
+
- Return [ void ]
86
87
}
87
88

88
89
Method [ <internal:Core, ctor> public method __construct ] {
89
90

90
91
- Parameters [3] {
91
-
Parameter #0 [ <optional> $message ]
92
-
Parameter #1 [ <optional> $code ]
93
-
Parameter #2 [ <optional> $previous ]
92
+
Parameter #0 [ <optional> string $message = "" ]
93
+
Parameter #1 [ <optional> int $code = 0 ]
94
+
Parameter #2 [ <optional> ?Throwable $previous = null ]
94
95
}
95
96
}
96
97

97
-
Method [ <internal:Core> final public method getMessage ] {
98
+
Method [ <internal:Core> public method __wakeup ] {
99
+

100
+
- Parameters [0] {
101
+
}
102
+
- Tentative return [ void ]
98
103
}
99
104

100
-
Method [ <internal:Core> final public method getCode ] {
105
+
Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
106
+

107
+
- Parameters [0] {
108
+
}
109
+
- Return [ string ]
110
+
}
111
+

112
+
Method [ <internal:Core, prototype Throwable> final public method getCode ] {
113
+

114
+
- Parameters [0] {
115
+
}
101
116
}
102
117

103
-
Method [ <internal:Core> final public method getFile ] {
118
+
Method [ <internal:Core, prototype Throwable> final public method getFile ] {
119
+

120
+
- Parameters [0] {
121
+
}
122
+
- Return [ string ]
104
123
}
105
124

106
-
Method [ <internal:Core> final public method getLine ] {
125
+
Method [ <internal:Core, prototype Throwable> final public method getLine ] {
126
+

127
+
- Parameters [0] {
128
+
}
129
+
- Return [ int ]
107
130
}
108
131

109
-
Method [ <internal:Core> final public method getTrace ] {
132
+
Method [ <internal:Core, prototype Throwable> final public method getTrace ] {
133
+

134
+
- Parameters [0] {
135
+
}
136
+
- Return [ array ]
110
137
}
111
138

112
-
Method [ <internal:Core> final public method getPrevious ] {
139
+
Method [ <internal:Core, prototype Throwable> final public method getPrevious ] {
140
+

141
+
- Parameters [0] {
142
+
}
143
+
- Return [ ?Throwable ]
113
144
}
114
145

115
-
Method [ <internal:Core> final public method getTraceAsString ] {
146
+
Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] {
147
+

148
+
- Parameters [0] {
149
+
}
150
+
- Return [ string ]
116
151
}
117
152

118
-
Method [ <internal:Core> public method __toString ] {
153
+
Method [ <internal:Core, prototype Stringable> public method __toString ] {
154
+

155
+
- Parameters [0] {
156
+
}
157
+
- Return [ string ]
119
158
}
120
159
}
121
160
}
...
...
@@ -136,7 +175,6 @@ Class [ <internal:Core> class Exception ] {
136
175
</refsect1>
137
176

138
177
</refentry>
139
-

140
178
<!-- Keep this comment at the end of the file
141
179
Local variables:
142
180
mode: sgml
143
181