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 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: ec2fe9a592f794978114ef5021db9f1d00c2e05d Maintainer: daijie Status: ready -->
3+ <!-- EN-Revision: c4aabaa0b97ef1ecc00cf2cd539ea186c6a855ae Maintainer: daijie Status: ready -->
44<!-- CREDITS: mowangjuanzi -->
55<refentry xml : id =" reflectionclass.setstaticpropertyvalue" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
66 <refnamediv >
77 <refname >ReflectionClass::setStaticPropertyValue</refname >
8- <refpurpose >设置静态属性的值 </refpurpose >
8+ <refpurpose >设置 public static 属性的值 </refpurpose >
99 </refnamediv >
1010
1111 <refsect1 role =" description" >
1515 <methodparam ><type >string</type ><parameter >name</parameter ></methodparam >
1616 <methodparam ><type >mixed</type ><parameter >value</parameter ></methodparam >
1717 </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 >
2124 </refsect1 >
2225
2326 <refsect1 role =" parameters" >
5154 </para >
5255 </refsect1 >
5356
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+
5480 <refsect1 role =" seealso" >
5581 &reftitle.seealso;
5682 <para >
5783 <simplelist >
5884 <member ><methodname >ReflectionClass::getStaticPropertyValue</methodname ></member >
85+ <member ><methodname >ReflectionProperty::setValue</methodname ></member >
5986 </simplelist >
6087 </para >
6188 </refsect1 >
You can’t perform that action at this time.
0 commit comments