svn: /phpdoc/fa/trunk/ language/basic-syntax.xml reference/intl/dateformatter/set-lenient.xml reference/reflection/book.xml reference/reflection/reflectionclass/getproperties.xml
[email protected] (Pedram Salehpoor)
| Newsgroups | php.doc.fa |
|---|---|
| Message-ID | <[email protected]> |
psalehpoor Thu, 06 May 2010 06:22:11 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=299055
Log:
update
Changed paths:
U phpdoc/fa/trunk/language/basic-syntax.xml
U phpdoc/fa/trunk/reference/intl/dateformatter/set-lenient.xml
U phpdoc/fa/trunk/reference/reflection/book.xml
U phpdoc/fa/trunk/reference/reflection/reflectionclass/getproperties.xml
Modified: phpdoc/fa/trunk/language/basic-syntax.xml
===================================================================
--- phpdoc/fa/trunk/language/basic-syntax.xml 2010-05-06 06:14:12 UTC (rev 299054)
+++ phpdoc/fa/trunk/language/basic-syntax.xml 2010-05-06 06:22:11 UTC (rev 299055)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 297028 Maintainer: pedram Status: ready -->
+<!-- EN-Revision: 297962 Maintainer: pedram Status: ready -->
<!-- Reviewed: yes -->
<!-- $Revision$ -->
<chapter xml:id="language.basic-syntax" xmlns="http://docbook.org/ns/docbook">
@@ -104,6 +104,13 @@
ارائه شده از برچسب کوتاه استفاده ننمایید.
</para>
</note>
+ <note>
+ <para>
+ در PHP 5.2 و پیش از آن پارسر اجازه نمیدهد که برچسب شروع
+ <literal><?php</literal> تنها مورد موجود در فایل باشد.
+ این کار در PHP 5.3 ممکن است.
+ </para>
+ </note>
</para>
</sect1>
<sect1 xml:id="language.basic-syntax.instruction-separation">
Modified: phpdoc/fa/trunk/reference/intl/dateformatter/set-lenient.xml
===================================================================
--- phpdoc/fa/trunk/reference/intl/dateformatter/set-lenient.xml 2010-05-06 06:14:12 UTC (rev 299054)
+++ phpdoc/fa/trunk/reference/intl/dateformatter/set-lenient.xml 2010-05-06 06:22:11 UTC (rev 299055)
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- EN-Revision: 294396 Maintainer: pedram Status: ready -->
+<!-- Reviewed: yes -->
<!-- $Revision$ -->
<refentry xml:id="intldateformatter.setlenient" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Modified: phpdoc/fa/trunk/reference/reflection/book.xml
===================================================================
--- phpdoc/fa/trunk/reference/reflection/book.xml 2010-05-06 06:14:12 UTC (rev 299054)
+++ phpdoc/fa/trunk/reference/reflection/book.xml 2010-05-06 06:22:11 UTC (rev 299055)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 290998 Maintainer: pedram Status: ready -->
+<!-- EN-Revision: 298791 Maintainer: pedram Status: ready -->
<!-- Reviewed: yes -->
<!-- $Revision$ -->
@@ -15,6 +15,11 @@
علاوه بر این reflection API راههایی برای دریافت توضیح
doc تابعها، کلاسها و متدها.
</para>
+ <para>
+ لطفا توجه کنید که بعضی بخشهای خاص <acronym>API</acronym> داخلی کد مورد نیاز برای کار با ضمیمه Reflection ندارند.
+ به عنوان مثال کلاس داخلی PHP داده reflection را برای خاصیتها ندارد.
+این حالات خطا محصوب میشود که به هر حال باید یافت شوند و اصلاح گردند.
+ </para>
</preface>
&reference.reflection.setup;
Modified: phpdoc/fa/trunk/reference/reflection/reflectionclass/getproperties.xml
===================================================================
--- phpdoc/fa/trunk/reference/reflection/reflectionclass/getproperties.xml 2010-05-06 06:14:12 UTC (rev 299054)
+++ phpdoc/fa/trunk/reference/reflection/reflectionclass/getproperties.xml 2010-05-06 06:22:11 UTC (rev 299055)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 290998 Maintainer: pedram Status: ready -->
+<!-- EN-Revision: 298817 Maintainer: pedram Status: ready -->
<!-- Reviewed: yes -->
<!-- $Revision$ -->
@@ -12,11 +12,11 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <modifier>public</modifier> <type>ReflectionProperty</type><methodname>ReflectionClass::getProperties</methodname>
- <methodparam choice="opt"><type>string</type><parameter>filter</parameter></methodparam>
+ <modifier>public</modifier> <type>array</type><methodname>ReflectionClass::getProperties</methodname>
+ <methodparam choice="opt"><type>int</type><parameter>filter</parameter></methodparam>
</methodsynopsis>
<para>
- دریافت خاصیتها.
+ دریافت خاصیتهای بازتابی.
</para>
&warn.undocumented.func;
@@ -31,7 +31,9 @@
<term><parameter>filter</parameter></term>
<listitem>
<para>
- فیلتر اختیاری.
+ فیلتر اختیاری برای فیلتر کردن انواع دلخواه فیلتر. با استفاده از
+ <link linkend="reflectionproperty.constants">ثابتهای ReflectionProperty</link>
+ و پیشفرضهای تمام خاصیتها تنظیم شده است.
</para>
</listitem>
</varlistentry>
@@ -42,15 +44,73 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- A <classname>ReflectionProperty</classname>.
+ آرایه اشیا <classname>ReflectionProperty</classname>.
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example xml:id="reflectionclass.getproperties.example.filter">
+ <title>مثال فیلتر<function>ReflectionClass::getProperties</function></title>
+ <para>
+ این مثال استفاده اختیاری از پارامتر <parameter>filter</parameter> را نشان میدهد که از خاصیتهای خصوصی استفاده نمیکند.
+ </para>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class Foo {
+ public $foo = 1;
+ protected $bar = 2;
+ private $baz = 3;
+}
+
+$foo = new Foo();
+
+$reflect = new ReflectionClass($foo);
+$props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED);
+
+foreach ($props as $prop) {
+ print $prop->getName() . "\n";
+}
+
+var_dump($props);
+
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+foo
+bar
+array(2) {
+ [0]=>
+ object(ReflectionProperty)#3 (2) {
+ ["name"]=>
+ string(3) "foo"
+ ["class"]=>
+ string(3) "Foo"
+ }
+ [1]=>
+ object(ReflectionProperty)#4 (2) {
+ ["name"]=>
+ string(3) "bar"
+ ["class"]=>
+ string(3) "Foo"
+ }
+}
+]]>
+ </screen>
+ </example>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><methodname>ReflectionClass::getProperty</methodname></member>
+ <member><classname>ReflectionProperty</classname></member>
+ <member><link linkend="reflectionproperty.constants">ثابتهای ReflectionProperty</link></member>
</simplelist>
</para>
</refsect1>