File tree Expand file tree Collapse file tree 1 file changed +32
-5
lines changed
reference/reflection/reflectionclass Expand file tree Collapse file tree 1 file changed +32
-5
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: ec2fe9a592f794978114ef5021db9f1d00c2e05d Maintainer: daijie Status: ready -->
3
+ <!-- EN-Revision: c4aabaa0b97ef1ecc00cf2cd539ea186c6a855ae Maintainer: daijie Status: ready -->
4
4
<!-- CREDITS: mowangjuanzi -->
5
5
<refentry xml : id =" reflectionclass.setstaticpropertyvalue" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
6
6
<refnamediv >
7
7
<refname >ReflectionClass::setStaticPropertyValue</refname >
8
- <refpurpose >设置静态属性的值 </refpurpose >
8
+ <refpurpose >设置 public static 属性的值 </refpurpose >
9
9
</refnamediv >
10
10
11
11
<refsect1 role =" description" >
15
15
<methodparam ><type >string</type ><parameter >name</parameter ></methodparam >
16
16
<methodparam ><type >mixed</type ><parameter >value</parameter ></methodparam >
17
17
</methodsynopsis >
18
- <para >
19
- 设置静态属性的值。
20
- </para >
18
+ <simpara >
19
+ 设置 public 静态属性的值。如果属性是 private 或 protected,则方法会失败。
20
+ </simpara >
21
+ <simpara >
22
+ <methodname >ReflectionProperty::setValue</methodname > 允许设置 public、private 和 protected 属性的值。
23
+ </simpara >
21
24
</refsect1 >
22
25
23
26
<refsect1 role =" parameters" >
51
54
</para >
52
55
</refsect1 >
53
56
57
+ <refsect1 role =" changelog" >
58
+ &reftitle.changelog;
59
+ <informaltable >
60
+ <tgroup cols =" 2" >
61
+ <thead >
62
+ <row >
63
+ <entry >&Version; </entry >
64
+ <entry >&Description; </entry >
65
+ </row >
66
+ </thead >
67
+ <tbody >
68
+ <row >
69
+ <entry >7.4.0</entry >
70
+ <entry >
71
+ 使用 <methodname >ReflectionClass::setStaticPropertyValue</methodname > 设置 private 或 protected
72
+ 静态属性现在会导致致命错误。之前会抛出 <classname >ReflectionException</classname >。
73
+ </entry >
74
+ </row >
75
+ </tbody >
76
+ </tgroup >
77
+ </informaltable >
78
+ </refsect1 >
79
+
54
80
<refsect1 role =" seealso" >
55
81
&reftitle.seealso;
56
82
<para >
57
83
<simplelist >
58
84
<member ><methodname >ReflectionClass::getStaticPropertyValue</methodname ></member >
85
+ <member ><methodname >ReflectionProperty::setValue</methodname ></member >
59
86
</simplelist >
60
87
</para >
61
88
</refsect1 >
You can’t perform that action at this time.
0 commit comments