improved ReflectionProperty::isDefault() docs

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337485 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2015-08-15 16:29:14 +00:00
parent 878a454b06
commit 5399e97fab

View file

@ -4,7 +4,7 @@
<refentry xml:id="reflectionproperty.isdefault" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionProperty::isDefault</refname>
<refpurpose>Checks if default value </refpurpose>
<refpurpose>Checks if property is a default property</refpurpose>
</refnamediv>
<refsect1 role="description">
@ -32,6 +32,41 @@
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><methodname>ReflectionClass::isDefault</methodname> example</title>
<programlisting role="php">
<![CDATA[
<?php
class Foo {
public $bar;
}
$rc = new ReflectionClass('Foo');
$rp = $rc->getProperty('bar');
var_dump($rp->isDefault());
$o = new Foo();
$o->baz = 42;
$ro = new ReflectionObject($o);
$rp = $ro->getProperty('baz');
var_dump($rp->isDefault());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
bool(true)
bool(false)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>