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,10 +8,10 @@
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>
...
...
@@ -23,7 +22,7 @@
23
22
<para>
24
23
<variablelist>
25
24
<varlistentry>
26
-
<term><parameter>argument</parameter></term>
25
+
<term><parameter>objectOrClass</parameter></term>
27
26
<listitem>
28
27
<para>
29
28
Either a <type>string</type> containing the name of the class to
...
...
@@ -35,13 +34,6 @@
35
34
</para>
36
35
</refsect1>
37
36

38
-
<refsect1 role="returnvalues">
39
-
&reftitle.returnvalues;
40
-
<para>
41
-
Returns constructed <classname>ReflectionClass</classname> instance.
42
-
</para>
43
-
</refsect1>
44
-

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

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

78
71
- Properties [7] {
79
-
Property [ <default> protected $message ]
80
-
Property [ <default> private $string ]
81
-
Property [ <default> protected $code ]
82
-
Property [ <default> protected $file ]
83
-
Property [ <default> protected $line ]
84
-
Property [ <default> private $trace ]
85
-
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 ]
86
79
}
87
80

88
-
- Methods [10] {
89
-
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 ]
90
87
}
91
88

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

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

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

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

104
-
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
+
}
105
116
}
106
117

107
-
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 ]
108
123
}
109
124

110
-
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 ]
111
130
}
112
131

113
-
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 ]
114
137
}
115
138

116
-
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 ]
117
144
}
118
145

119
-
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 ]
120
151
}
121
152

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

155
+
- Parameters [0] {
156
+
}
157
+
- Return [ string ]
123
158
}
124
159
}
125
160
}
...
...
@@ -140,7 +175,6 @@ Class [ <internal:Core> class Exception ] {
140
175
</refsect1>
141
176

142
177
</refentry>
143
-

144
178
<!-- Keep this comment at the end of the file
145
179
Local variables:
146
180
mode: sgml
147
181