cvs: peardoc /ja/chapters standards.xml /ja/package/database db.xml /ja/package/database/mdb2 intro-execute.xml intro-manager-module.xml
/ja/package/pear/pear-info whatsnew.xml /ja/package/php php-compatinfo.xml /ja/package/php/php-compatinfo api.xml cli.xml whatsnew.xml
/ja/package/php/php-compatinfo/php-compatinfo parsearray.xml parsedir.xml parsefile.xml parsefolder.xml parsestring.xml

From: Date: Sun, 13 Apr 2008 10:36:18 +0000
Subject: cvs: peardoc /ja/chapters standards.xml /ja/package/database db.xml /ja/package/database/mdb2 intro-execute.xml intro-manager-module.xml
/ja/package/pear/pear-info whatsnew.xml /ja/package/php php-compatinfo.xml /ja/package/php/php-compatinfo api.xml cli.xml whatsnew.xml
/ja/package/php/php-compatinfo/php-compatinfo parsearray.xml parsedir.xml parsefile.xml parsefolder.xml parsestring.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-10661@lists.php.net to get a copy of this message
takagi Sun Apr 13 10:36:18 2008 UTC Modified files: /peardoc/ja/package/php/php-compatinfo/php-compatinfo parsestring.xml parsefolder.xml parsefile.xml parsedir.xml parsearray.xml /peardoc/ja/package/php/php-compatinfo whatsnew.xml cli.xml api.xml /peardoc/ja/package/php php-compatinfo.xml /peardoc/ja/package/pear/pear-info whatsnew.xml /peardoc/ja/package/database/mdb2 intro-manager-module.xml intro-execute.xml /peardoc/ja/package/database db.xml /peardoc/ja/chapters standards.xml Log: sync with en.

http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsestring.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsestring.xml diff -u peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsestring.xml:1.2 peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsestring.xml:1.3 --- peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsestring.xml:1.2 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsestring.xml Sun Apr 13 10:36:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.php-compatinfo.parsestring"> <refnamediv> <refname><function>PHP_CompatInfo::parseString</function></refname> @@ -129,7 +129,8 @@ <literal>version</literal>, <literal>extensions</literal>, <literal>constants</literal>, - <literal>tokens</literal> + <literal>tokens</literal>, + <literal>cond_code</literal> </para> </refsect1> @@ -182,6 +183,22 @@ 'tokens' => array ( ), + 'cond_code' => + array ( + 0 => 0, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), ) </screen> これは、このコードを実行するには少なくとも PHP 5.1.3 http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefolder.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefolder.xml diff -u peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefolder.xml:1.2 peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefolder.xml:1.3 --- peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefolder.xml:1.2 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefolder.xml Sun Apr 13 10:36:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.php-compatinfo.parsefolder"> <refnamediv> <refname><function>PHP_CompatInfo::parseFolder</function></refname> @@ -96,7 +96,8 @@ <literal>version</literal>, <literal>extensions</literal>, <literal>constants</literal>, - <literal>tokens</literal> + <literal>tokens</literal>, + <literal>cond_code</literal> </para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefile.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefile.xml diff -u peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefile.xml:1.2 peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefile.xml:1.3 --- peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefile.xml:1.2 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsefile.xml Sun Apr 13 10:36:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.php-compatinfo.parsefile"> <refnamediv> <refname><function>PHP_CompatInfo::parseFile</function></refname> @@ -129,7 +129,8 @@ <literal>version</literal>, <literal>extensions</literal>, <literal>constants</literal>, - <literal>tokens</literal> + <literal>tokens</literal>, + <literal>cond_code</literal> </para> </refsect1> @@ -233,6 +234,13 @@ 'tokens' => array ( ), + 'cond_code' => + array ( + 0 => 5, + 1 => + array ( + ), + ), ) </screen> これは、php の simple_load_file() 関数と定数 DATE_W3C http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsedir.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsedir.xml diff -u peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsedir.xml:1.2 peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsedir.xml:1.3 --- peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsedir.xml:1.2 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsedir.xml Sun Apr 13 10:36:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.php-compatinfo.parsedir"> <refnamediv> <refname><function>PHP_CompatInfo::parseDir</function></refname> @@ -164,7 +164,8 @@ <literal>version</literal>, <literal>extensions</literal>, <literal>constants</literal>, - <literal>tokens</literal> + <literal>tokens</literal>, + <literal>cond_code</literal> </para> </refsect1> @@ -253,6 +254,22 @@ 10 => 'catch', 11 => 'final', ), + 'cond_code' => + array ( + 0 => 2, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), 'PHP_CompatInfo/tests/parseDir/extensions.php' => array ( 'ignored_functions' => @@ -280,6 +297,61 @@ 'tokens' => array ( ), + 'cond_code' => + array ( + 0 => 2, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), + ), + 'PHP_CompatInfo/tests/parseDir/phpinfo.php' => + array ( + 'ignored_functions' => + array ( + ), + 'ignored_extensions' => + array ( + ), + 'ignored_constants' => + array ( + ), + 'max_version' => '', + 'version' => '4.0.0', + 'extensions' => + array ( + ), + 'constants' => + array ( + ), + 'tokens' => + array ( + ), + 'cond_code' => + array ( + 0 => 0, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), ), 'PHP_CompatInfo/tests/parseDir/PHP5/tokens.php5' => array ( @@ -315,6 +387,22 @@ 10 => 'catch', 11 => 'final', ), + 'cond_code' => + array ( + 0 => 0, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), ), 'PHP_CompatInfo/tests/parseDir/PHP5/upload_error.php' => array ( @@ -347,28 +435,21 @@ array ( 0 => 'throw', ), - ), - 'PHP_CompatInfo/tests/parseDir/phpinfo.php' => - array ( - 'ignored_functions' => - array ( - ), - 'ignored_extensions' => - array ( - ), - 'ignored_constants' => - array ( - ), - 'max_version' => '', - 'version' => '4.0.0', - 'extensions' => - array ( - ), - 'constants' => - array ( - ), - 'tokens' => + 'cond_code' => array ( + 0 => 0, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), ), ), ) http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsearray.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsearray.xml diff -u peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsearray.xml:1.2 peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsearray.xml:1.3 --- peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsearray.xml:1.2 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/php-compatinfo/parsearray.xml Sun Apr 13 10:36:17 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.php-compatinfo.parsearray"> <refnamediv> <refname><function>PHP_CompatInfo::parseArray</function></refname> @@ -148,7 +148,8 @@ <literal>version</literal>, <literal>extensions</literal>, <literal>constants</literal>, - <literal>tokens</literal> + <literal>tokens</literal>, + <literal>cond_code</literal> </para> </refsect1> @@ -193,16 +194,31 @@ 'extensions' => array ( 0 => 'sapi_cgi', - 1 => 'tokenizer', - 2 => 'pcre', + 1 => 'pcre', + 2 => 'tokenizer', ), 'constants' => array ( - 0 => 'DIRECTORY_SEPARATOR', ), 'tokens' => array ( ), + 'cond_code' => + array ( + 0 => 7, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), '/opt/lampp/etc/pear/PEAR.php' => array ( 'ignored_functions' => @@ -218,7 +234,7 @@ 'version' => '4.3.0', 'extensions' => array ( - 0 => 'sapi_cgi', + 0 => 'sapi_cgi', ), 'constants' => array ( @@ -226,6 +242,22 @@ 'tokens' => array ( ), + 'cond_code' => + array ( + 0 => 7, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), ), '/opt/lampp/etc/pear/PHP/CompatInfo.php' => array ( @@ -242,16 +274,31 @@ 'version' => '4.3.0', 'extensions' => array ( - 0 => 'tokenizer', - 1 => 'pcre', + 0 => 'pcre', + 1 => 'tokenizer', ), 'constants' => array ( - 0 => 'DIRECTORY_SEPARATOR', ), 'tokens' => array ( ), + 'cond_code' => + array ( + 0 => 0, + 1 => + array ( + 0 => + array ( + ), + 1 => + array ( + ), + 2 => + array ( + ), + ), + ), ), ) </screen> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/whatsnew.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/whatsnew.xml diff -u peardoc/ja/package/php/php-compatinfo/whatsnew.xml:1.4 peardoc/ja/package/php/php-compatinfo/whatsnew.xml:1.5 --- peardoc/ja/package/php/php-compatinfo/whatsnew.xml:1.4 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/whatsnew.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.8 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.12 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.whatsnew"> <refnamediv> <refname>ニュース</refname> @@ -288,7 +288,7 @@ </listitem> <listitem> <para><emphasis role="bold">コマンドラインインターフェイス</emphasis> - の結果表示を &quot;xml&quot; あるいは &quot;cli&quot; (デフォルト) + の結果表示を xml あるいはテキスト (デフォルト) で行えるようになりました。 新しいパラメータ -r あるいは --report を使用します。 </para> @@ -323,10 +323,13 @@ <simpara>Version カラムは 9 文字</simpara> </listitem> <listitem> - <simpara>Extensions カラムは 13 文字</simpara> + <simpara>C カラム (条件コードレベル) は 3 文字</simpara> </listitem> <listitem> - <simpara>Constants/Tokens カラムは 23 文字</simpara> + <simpara>Extensions カラムは 12 文字</simpara> + </listitem> + <listitem> + <simpara>Constants/Tokens カラムは 20 文字</simpara> </listitem> </itemizedlist> </para> @@ -377,6 +380,37 @@ CLI で生成される XML レポートが、ルートタグ (pci) を含む正しい形式になりました。 </para> + <para> + <warning> + <simpara> + XML のフォーマットはバージョン 1.6.x のものとの互換性がありません。 + </simpara> + </warning> + </para> + </listitem> + <listitem> + <para> + <emphasis role="bold">条件コード</emphasis> (function_exists など) を + PHP スクリプトで使用しているかどうかを知ることができるようになりました。 + ソースコードのパース中に見つかった条件コードの警告レベル (および詳細) + は、すべてのインターフェイスで確認できます (コマンドラインの場合も、 + 新しいカラム C で見ることができます)。 + </para> + </listitem> + <listitem> + <para> + CLI で <emphasis role="bold">テキスト出力がカスタマイズ可能</emphasis> + になりました。新しいスイッチ --output-level を使用します。 + Path/File+Version は、最低限の出力 (0) から完全な詳細表示 (最大値:15 - デフォルト) + まで常に表示されます。 + </para> + </listitem> + <listitem> + <para> + CLI で <emphasis role="bold">結果の要約が可能</emphasis> + になりました。新しいスイッチ --summarize switch を使用します。 + ディレクトリのパース時に、すべてのファイルから余計な行を削除します。 + </para> </listitem> </itemizedlist> </para> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/cli.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/cli.xml diff -u peardoc/ja/package/php/php-compatinfo/cli.xml:1.5 peardoc/ja/package/php/php-compatinfo/cli.xml:1.6 --- peardoc/ja/package/php/php-compatinfo/cli.xml:1.5 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/cli.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.8 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.9 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.cli"> <refnamediv> <refname>CLI</refname> @@ -87,24 +87,38 @@ レベル 0 の場合、pci は -d あるいは -f に関連する結果だけを出力します。 表の 1 行目を参照ください。複数行ある場合は、2 行目以降はディレクトリ内の各ファイルとなります。 <screen> -+-----------------------------+---------+-------------+-----------------------+ -| Path | Version | Extensions | Constants/Tokens | -+-----------------------------+---------+-------------+-----------------------+ -| * | 4.3.0 | bcmath | __FILE__ | -| | | pcre | | -+-----------------------------+---------+-------------+-----------------------+ -| math.php | 3.0.9 | bcmath | | -| | | pcre | | -+-----------------------------+---------+-------------+-----------------------+ -| errorHandler.php | 4.3.0 | | | -+-----------------------------+---------+-------------+-----------------------+ ++-----------------------------+---------+---+------------+--------------------+ +| Path | Version | C | Extensions | Constants/Tokens | ++-----------------------------+---------+---+------------+--------------------+ +| ...amp\tmp\HTML_CSS-1.5.1\* | 5.0.0 | 5 | pcre | __FILE__ | +| | | | date | ...CTORY_SEPARATOR | +| | | | | PHP_EOL | +| | | | | public | +| | | | | protected | ++-----------------------------+---------+---+------------+--------------------+ +| ...p\HTML_CSS-1.5.1\CSS.php | 5.0.0 | 1 | pcre | | +| | | | date | | ++-----------------------------+---------+---+------------+--------------------+ +| ...1.5.1\tests\AllTests.php | 5.0.0 | 4 | | __FILE__ | +| | | | | public | ++-----------------------------+---------+---+------------+--------------------+ +| ...L_CSS_TestSuite_Bugs.php | 5.0.0 | 4 | | protected | +| | | | | public | ++-----------------------------+---------+---+------------+--------------------+ +| ...S_TestSuite_Standard.php | 5.0.0 | 4 | | __FILE__ | +| | | | | ...CTORY_SEPARATOR | +| | | | | protected | +| | | | | public | ++-----------------------------+---------+---+------------+--------------------+ +| ...xamples\CSS_Advanced.php | 3.0.0 | 0 | | | ++-----------------------------+---------+---+------------+--------------------+ </screen> </para> <para> - レベル 1 の場合、pci はレベル 0 の結果に加えてコマンドライン引数の値を出力します。 + レベル 1 の場合、pci はレベル 0 の結果に加えてコマンドライン引数の概要を出力します。 たとえば次のようなコマンドを実行した場合、 <synopsis> -pci -v 1 -d \wamp\www\pci +pci -v 1 -d C:\wamp\tmp\HTML_CSS-1.5.1 </synopsis> レベル 0 の表 (先ほどのもの) に加えて次の内容を出力します。 <screen> @@ -113,8 +127,8 @@ +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ -| dir | \wamp\www\pci | | verbose | 1 | +| dir | C:\wamp\tmp\HTML_CSS-1.5.1 | +-------------------------+---------------------------------------------------+ </screen> </para> @@ -123,17 +137,17 @@ ファイルやディレクトリのパースに使用するオプションの一覧を出力します。 たとえば次のようなコマンドを実行した場合、 <synopsis> -pci -d \wamp\www\pci -v 2 +pci -v 2 -d C:\wamp\tmp\HTML_CSS-1.5.1 </synopsis> レベル 0 の表 (先ほどのもの) に加えて次の内容を出力します。 <screen> Parser options : -+--------+-------+ -| Option | Value | -+--------+-------+ -| | | -+--------+-------+ ++-------------------------+---------------------------------------------------+ +| Option | Value | ++-------------------------+---------------------------------------------------+ +| debug | FALSE | ++-------------------------+---------------------------------------------------+ </screen> <note> <simpara> @@ -145,7 +159,7 @@ レベル 3 の場合、pci はレベル 0、1 および 2 の内容をすべて出力します。 たとえば次のようなコマンドを実行した場合、 <synopsis> -pci -d \wamp\www\pci -n -v 3 +pci -v 3 -n -d C:\wamp\tmp\HTML_CSS-1.5.1 </synopsis> レベル 0 の表 (先ほどのもの) に加えて次の内容を出力します。 <screen> @@ -154,9 +168,9 @@ +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ -| dir | \wamp\www\pci | -| no-recurse | 1 | | verbose | 3 | +| no-recurse | 1 | +| dir | C:\wamp\tmp\HTML_CSS-1.5.1 | +-------------------------+---------------------------------------------------+ Parser options : @@ -164,6 +178,7 @@ +-------------------------+---------------------------------------------------+ | Option | Value | +-------------------------+---------------------------------------------------+ +| debug | FALSE | | recurse_dir | FALSE | +-------------------------+---------------------------------------------------+ </screen> @@ -173,25 +188,34 @@ pci はレベル 0 の結果に加えて実装されている関数の一覧とバージョンを出力します。 たとえば次のようなコマンドを実行した場合、 <synopsis> -pci -f \wamp\www\pci\math.php -v4 +pci -v 4 -f C:\wamp\tmp\HTML_CSS-1.5.1\CSS.php </synopsis> 結果はこのようになります。 <screen> -+-----------------------------+---------+-------------+-----------------------+ -| File | Version | Extensions | Constants/Tokens | -+-----------------------------+---------+-------------+-----------------------+ -| \wamp\www\pci\math.php | 3.0.9 | bcmath | | -| | | pcre | | -+-----------------------------+---------+-------------+-----------------------+ ++-----------------------------+---------+---+------------+--------------------+ +| File | Version | C | Extensions | Constants/Tokens | ++-----------------------------+---------+---+------------+--------------------+ +| ...p\HTML_CSS-1.5.1\CSS.php | 5.0.0 | 1 | pcre | | +| | | | date | | ++-----------------------------+---------+---+------------+--------------------+ Debug: -+---------+------------+------------+ -| Version | Function | Extension | -+---------+------------+------------+ -| 3.0.9 | preg_match | ext_pcre | -| 3.0.0 | bcsub | ext_bcmath | -+---------+------------+------------+ ++---------+----------------------+-----------+------+ +| Version | Function | Extension | PECL | ++---------+----------------------+-----------+------+ +| 4.0.0 | define | | no | +| 4.0.0 | is_array | | no | +| 4.0.0 | strtolower | | no | +| 4.0.0 | substr | | no | +... (もっとたくさんありますが、省略します) ... +| 4.0.0 | func_get_args | | no | +| 4.0.4 | call_user_func_array | | no | +| 4.0.6 | is_callable | | no | +| 4.0.7 | version_compare | | no | +| 4.3.0 | debug_backtrace | | no | +| 5.0.0 | file_put_contents | | no | ++---------+----------------------+-----------+------+ </screen> </para> <para> @@ -360,23 +384,47 @@ </term> <listitem> <para> - xml あるいは cli (デフォルト) のいずれかで結果を表示します。 + xml あるいはテキスト (デフォルト) のいずれかで結果を表示します。 </para> <para> たとえば、 <synopsis> pci -r xml -f C:\wamp\php\PEAR\PHP\CodeSniffer.php </synopsis> - の結果はこのようになります。 + の結果はこのようになります (XML_Beautifier パッケージが使用可能な場合)。 <screen> <![CDATA[ <?xml version="1.0" encoding="UTF-8"?> -<file name="C:\wamp\php\PEAR\PHP\CodeSniffer.php"> -<version>5.1.2</version> -<extension count="5">spl, pcre, date, xml, tokenizer</extension> -<token count="3">throw, protected, public</token> -<constant count="3">__FILE__, PHP_EOL, DIRECTORY_SEPARATOR</constant> -</file> +<pci version="1.7.0"> + <files count="1"> + <file name="C:\wamp\tmp\PHP_CodeSniffer-1.0.1\CodeSniffer.php"> + <version>5.1.2</version> + <conditions level="0" /> + <extensions count="5"> + <extension>spl</extension> + <extension>pcre</extension> + <extension>date</extension> + <extension>xml</extension> + <extension>tokenizer</extension> + </extensions> + <constants count="3"> + <constant>__FILE__</constant> + <constant>PHP_EOL</constant> + <constant>DIRECTORY_SEPARATOR</constant> + </constants> + <tokens count="3"> + <token>throw</token> + <token>protected</token> + <token>public</token> + </tokens> + <ignored> + <functions count="0" /> + <extensions count="0" /> + <constants count="0" /> + </ignored> + </file> + </files> +</pci> ]]> </screen> また、さらにデバッグオプション ( -v4 ) を追加すると、 @@ -387,52 +435,78 @@ <screen> <![CDATA[ <?xml version="1.0" encoding="UTF-8"?> -<file name="C:\wamp\php\PEAR\PHP\CodeSniffer.php"> -<version>5.1.2</version> -<extension count="5">spl, pcre, date, xml, tokenizer</extension> -<token count="3">throw, protected, public</token> -<constant count="3">__FILE__, PHP_EOL, DIRECTORY_SEPARATOR</constant> -<function extension="spl" pecl="false" version="5.1.2">spl_autoload_register</function> -<function version="5.0.2">interface_exists</function> -<function version="5.0.0">file_put_contents</function> -<function extension="tokenizer" pecl="false" version="4.2.0">token_name</function> -<function version="4.2.0">var_export</function> -<function version="4.0.4">constant</function> -<function version="4.0.2">wordwrap</function> -<function version="4.0.0">class_exists</function> -<function version="4.0.0">define</function> -<function version="4.0.0">chdir</function> -<function version="4.0.0">dirname</function> -<function version="4.0.0">substr</function> -<function version="4.0.0">str_replace</function> -<function version="4.0.0">is_file</function> -<function version="4.0.0">is_array</function> -<function version="4.0.0">is_string</function> -<function version="4.0.0">is_dir</function> -<function version="4.0.0">basename</function> -<function version="4.0.0">realpath</function> -<function version="4.0.0">count</function> -<function version="4.0.0">strtolower</function> -<function version="4.0.0">strrpos</function> -<function version="4.0.0">in_array</function> -<function version="4.0.0">explode</function> -<function version="4.0.0">array_pop</function> -<function version="4.0.0">array_merge</function> -<function version="4.0.0">file_exists</function> -<function version="4.0.0">strtr</function> -<function extension="pcre" pecl="false" version="4.0.0">preg_match</function> -<function extension="date" pecl="false" version="4.0.0">time</function> -<function version="4.0.0">ksort</function> -<function version="4.0.0">htmlspecialchars</function> -<function extension="xml" pecl="false" version="4.0.0">utf8_encode</function> -<function version="4.0.0">strlen</function> -<function version="4.0.0">str_repeat</function> -<function version="4.0.0">ord</function> -<function version="4.0.0">strtoupper</function> -<function version="4.0.0">strpos</function> -<function version="4.0.0">rtrim</function> -<function version="4.0.0">is_writable</function> -</file> +<pci version="1.7.0"> + <files count="1"> + <file name="C:\wamp\tmp\PHP_CodeSniffer-1.0.1\CodeSniffer.php"> + <version>5.1.2</version> + <conditions count="0" level="0" /> + <extensions count="5"> + <extension>spl</extension> + <extension>pcre</extension> + <extension>date</extension> + <extension>xml</extension> + <extension>tokenizer</extension> + </extensions> + <constants count="3"> + <constant>__FILE__</constant> + <constant>PHP_EOL</constant> + <constant>DIRECTORY_SEPARATOR</constant> + </constants> + <tokens count="3"> + <token>throw</token> + <token>protected</token> + <token>public</token> + </tokens> + <ignored> + <functions count="0" /> + <extensions count="0" /> + <constants count="0" /> + </ignored> + <functions count="40"> + <function version="4.0.0">class_exists</function> + <function version="4.0.0">define</function> + <function version="4.0.0">chdir</function> + <function version="4.0.0">dirname</function> + <function version="4.0.0">substr</function> + <function version="4.0.0">str_replace</function> + <function version="4.0.0">is_file</function> + <function version="4.0.0">is_array</function> + <function version="4.0.0">is_string</function> + <function version="4.0.0">is_dir</function> + <function version="4.0.0">basename</function> + <function version="4.0.0">realpath</function> + <function version="4.0.0">count</function> + <function version="4.0.0">strtolower</function> + <function version="4.0.0">strrpos</function> + <function version="4.0.0">in_array</function> + <function version="4.0.0">explode</function> + <function version="4.0.0">array_pop</function> + <function version="4.0.0">array_merge</function> + <function version="4.0.0">file_exists</function> + <function version="4.0.0">strtr</function> + <function extension="pcre" pecl="false" version="4.0.0">preg_match</function> + <function extension="date" pecl="false" version="4.0.0">time</function> + <function version="4.0.0">ksort</function> + <function version="4.0.0">htmlspecialchars</function> + <function extension="xml" pecl="false" version="4.0.0">utf8_encode</function> + <function version="4.0.0">strlen</function> + <function version="4.0.0">str_repeat</function> + <function version="4.0.0">ord</function> + <function version="4.0.0">strtoupper</function> + <function version="4.0.0">strpos</function> + <function version="4.0.0">rtrim</function> + <function version="4.0.0">is_writable</function> + <function version="4.0.2">wordwrap</function> + <function version="4.0.4">constant</function> + <function extension="tokenizer" pecl="false" version="4.2.0">token_name</function> + <function version="4.2.0">var_export</function> + <function version="5.0.0">file_put_contents</function> + <function version="5.0.2">interface_exists</function> + <function extension="spl" pecl="false" version="5.1.2">spl_autoload_register</function> + </functions> + </file> + </files> +</pci> ]]> </screen> </para> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo/api.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/php/php-compatinfo/api.xml diff -u peardoc/ja/package/php/php-compatinfo/api.xml:1.2 peardoc/ja/package/php/php-compatinfo/api.xml:1.3 --- peardoc/ja/package/php/php-compatinfo/api.xml:1.2 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo/api.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.6 Maintainer: takagi Status: ready --> <refentry id="package.php.php-compatinfo.api"> <refnamediv> <refname>API</refname> @@ -107,6 +107,18 @@ PHP5 のトークン (public, final, abstract, など ...) </para> </listitem> + <listitem> + <para> + <emphasis role="bold">cond_code</emphasis>, + ソースコードのパース中に見つかった条件コードについての警告レベル + (および詳細)。 + 0=なし, 1=function_exists, 2=extension_loaded, 4=defined + </para> + <para> + これはバイナリ値なので、たとえば 5 なら defined+function_exists + となります。 + </para> + </listitem> </itemizedlist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/php-compatinfo.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/ja/package/php/php-compatinfo.xml diff -u peardoc/ja/package/php/php-compatinfo.xml:1.5 peardoc/ja/package/php/php-compatinfo.xml:1.6 --- peardoc/ja/package/php/php-compatinfo.xml:1.5 Wed Mar 12 12:32:57 2008 +++ peardoc/ja/package/php/php-compatinfo.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.9 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.11 Maintainer: takagi Status: ready --> <sect1 id="package.php.php-compatinfo"> <title>PHP_CompatInfo</title> <para> @@ -79,6 +79,12 @@ (バージョン 1.7.0 以降で使用可能) </simpara> </listitem> + <listitem> + <simpara> + PHP スクリプトで使用している条件コード (function_exists など) を知る機能 + (バージョン 1.7.0 以降で使用可能) + </simpara> + </listitem> </itemizedlist> </para> </sect3> @@ -95,14 +101,6 @@ <para><ulink url="&url.pear;">PEAR</ulink> 1.5.4 以降</para> </listitem> <listitem> - <para><ulink url="&url.php;tokenizer">tokenizer</ulink> 拡張モジュール</para> - </listitem> - </itemizedlist> - </para> - <para> - これらはオプションです。 - <itemizedlist> - <listitem> <para> <ulink url="&url.pear.package;Console_Table">PEAR::Console_Table</ulink> 1.0.5 以降 </para> @@ -119,11 +117,29 @@ </listitem> <listitem> <para> + <ulink url="&url.pear.package;File_Find">PEAR::File_Find</ulink> 1.3.0 以降 + </para> + </listitem> + <listitem> + <para><ulink url="&url.php;tokenizer">tokenizer</ulink> 拡張モジュール</para> + </listitem> + </itemizedlist> + </para> + <para> + これらはオプションです。 + <itemizedlist> + <listitem> + <para> <ulink url="&url.phpunit.get;"> PHPUnit </ulink> 3.2.0 以降 </para> </listitem> + <listitem> + <para> + <ulink url="&url.pear.package;XML_Beautifier">PEAR::XML_Beautifier</ulink> 1.1 以降 + </para> + </listitem> </itemizedlist> </para> </sect3> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/pear/pear-info/whatsnew.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/pear/pear-info/whatsnew.xml diff -u peardoc/ja/package/pear/pear-info/whatsnew.xml:1.1 peardoc/ja/package/pear/pear-info/whatsnew.xml:1.2 --- peardoc/ja/package/pear/pear-info/whatsnew.xml:1.1 Sat Jan 19 03:32:29 2008 +++ peardoc/ja/package/pear/pear-info/whatsnew.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> <refentry id="package.pear.pear-info.whatsnew"> <refnamediv> <refname>ニュース</refname> @@ -146,6 +146,21 @@ </para> </refsect1> + <refsect1 id="package.pear.pear-info.whatsnew.18x"> + <title>Version 1.8.x</title> + <para> + <itemizedlist> + <listitem> + <para> + PEAR_Info がコマンドライン (CLI) でも使えるようになりました。 + phpinfo() のように <emphasis role="bold">テキスト形式のレポート</emphasis> + を出力します。 + </para> + </listitem> + </itemizedlist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/ja/package/database/mdb2/intro-manager-module.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/ja/package/database/mdb2/intro-manager-module.xml diff -u peardoc/ja/package/database/mdb2/intro-manager-module.xml:1.3 peardoc/ja/package/database/mdb2/intro-manager-module.xml:1.4 --- peardoc/ja/package/database/mdb2/intro-manager-module.xml:1.3 Fri Jan 4 19:50:53 2008 +++ peardoc/ja/package/database/mdb2/intro-manager-module.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.7 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.9 Maintainer: takagi Status: ready --> <refentry id="package.database.mdb2.intro-manager-module"> <refnamediv> @@ -225,7 +225,9 @@ </tgroup> </table> <function>createTable</function> の三番目のパラメータは、 - そのテーブルの別のオプションです。これは RDBMS に依存します。 + そのテーブルの別のオプションです。 + 文字セットや照合順序、その他 RDBMS 固有のプロパティ + (MySQL のテーブルエンジンなど) を指定します。 MySQL の場合の例を以下に示します。 <example> <title>people テーブルの作成</title> @@ -234,7 +236,7 @@ <?php $table_options = array( 'comment' => 'Repository of people', - 'character_set' => 'utf8', + 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'type' => 'innodb', ); http://cvs.php.net/viewvc.cgi/peardoc/ja/package/database/mdb2/intro-execute.xml?r1=1.8&r2=1.9&diff_format=u Index: peardoc/ja/package/database/mdb2/intro-execute.xml diff -u peardoc/ja/package/database/mdb2/intro-execute.xml:1.8 peardoc/ja/package/database/mdb2/intro-execute.xml:1.9 --- peardoc/ja/package/database/mdb2/intro-execute.xml:1.8 Fri Jan 11 13:12:25 2008 +++ peardoc/ja/package/database/mdb2/intro-execute.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.8 $ --> -<!-- EN-Revision: 1.24 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.9 $ --> +<!-- EN-Revision: 1.25 Maintainer: takagi Status: ready --> <!-- @@ -213,7 +213,7 @@ <?php // すでに $mdb2 という名前の MDB2 オブジェクトが存在するものとします $types = array('integer', 'text', 'text'); -$sth = $mdb2->prepare('INSERT INTO numbers VALUES (:id, :text, :lang)', $types); +$sth = $mdb2->prepare('INSERT INTO numbers VALUES (:id, :name, :lang)', $types); $data = array('id' => 1, 'name' => 'one', 'lang' => 'en'); $affectedRows = $sth->execute($data); http://cvs.php.net/viewvc.cgi/peardoc/ja/package/database/db.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/ja/package/database/db.xml diff -u peardoc/ja/package/database/db.xml:1.3 peardoc/ja/package/database/db.xml:1.4 --- peardoc/ja/package/database/db.xml:1.3 Mon Jul 2 15:07:40 2007 +++ peardoc/ja/package/database/db.xml Sun Apr 13 10:36:18 2008 @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" ?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.23 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.24 Maintainer: takagi Status: ready --> <sect1 id="package.database.db"> <title>DB</title> - + <warning> <para> このパッケージには後継版が存在します。新規プロジェクトでは @@ -26,6 +26,8 @@ &package.database.db.intro-portability; &package.database.db.intro-sequences; + &package.database.db.overview-get; + &package.database.db.db; &package.database.db.db.connect; &package.database.db.db.iserror; http://cvs.php.net/viewvc.cgi/peardoc/ja/chapters/standards.xml?r1=1.24&r2=1.25&diff_format=u Index: peardoc/ja/chapters/standards.xml diff -u peardoc/ja/chapters/standards.xml:1.24 peardoc/ja/chapters/standards.xml:1.25 --- peardoc/ja/chapters/standards.xml:1.24 Wed Mar 12 12:32:58 2008 +++ peardoc/ja/chapters/standards.xml Sun Apr 13 10:36:18 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.24 $ --> -<!-- EN-Revision: 1.64 Maintainer: haruki Status: working --> +<!-- $Revision: 1.25 $ --> +<!-- EN-Revision: 1.65 Maintainer: haruki Status: working --> <!-- CREDITS: hirokawa,takagi --> <chapter id="standards"> <title>標準コーディング規約</title> @@ -684,6 +684,34 @@ <sect1 id="standards.naming"> <title>命名規約</title> <sect2> + <title>グローバル変数および関数</title> + <para> + パッケージでグローバル変数を定義する場合は、 + 変数名の先頭はアンダースコアで始め、 + その後にパッケージ名を続けてさらにもうひとつアンダースコアをつけます。 + たとえば、PEAR パッケージでは + $_PEAR_destructor_object_list という名前のグローバル変数を使用しています。 + </para> + <para> + グローバル関数の名前は <quote>studly caps</quote> + 形式 (<quote>bumpy case</quote> あるいは <quote>camel + caps</quote> と呼ばれることもあります) で決めます。 + さらに、パッケージ名を先頭につけることで + パッケージ間での名前の競合を回避します。 + (先頭のパッケージ名の部分に続く) 最初の文字は小文字とし、 + その後は単語の先頭の文字のみを大文字とします。たとえばこのようになります。 + <informaltable> + <tgroup cols="1"> + <tbody> + <row> + <entry><simpara>XML_RPC_serializeData()</simpara></entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </sect2> + <sect2> <title>クラス</title> <para> クラスには、内容が理解できるような名前を指定するべきです。 @@ -705,23 +733,20 @@ </para> </sect2> <sect2> - <title>関数とメソッド</title> + <title>クラス変数およびメソッド</title> <para> - 関数とメソッドは、<quote>studly caps</quote> 形式 - (<quote>bumpy case</quote> または <quote>camel caps</quote> とも呼ばれます) - を使用して名前を付けるべきです。 - 関数には、パッケージ間の名前の衝突を避けるためにパッケージ名を接頭辞として - 加えるべきです。(接頭辞の後の)名前の最初の文字は小文字で、 - 新しい単語を始める際の各先頭文字は大文字とします。 - いくつかの例を示します。 + クラス変数 (プロパティ) およびメソッドの名前は <quote>studly caps</quote> + 形式 (<quote>bumpy case</quote> あるいは <quote>camel + caps</quote> と呼ばれることもあります) で決めます。 + 以下に例を示します (これらは <quote>public</quote> メンバーです)。 <informaltable> <tgroup cols="4"> <tbody> <row> + <entry><simpara>$counter</simpara></entry> <entry><simpara>connect()</simpara></entry> <entry><simpara>getData()</simpara></entry> <entry><simpara>buildSomeWidget()</simpara></entry> - <entry><simpara>XML_RPC_serializeData()</simpara></entry> </row> </tbody> </tgroup> @@ -736,9 +761,9 @@ <tgroup cols="3"> <tbody> <row> + <entry><simpara>$_status</simpara></entry> <entry><simpara>_sort()</simpara></entry> <entry><simpara>_initTree()</simpara></entry> - <entry><simpara>$this->_status</simpara></entry> </row> </tbody> </tgroup> @@ -768,9 +793,17 @@ <para> 定数は、すべて大文字で記述し、単語の区切りにはアンダースコアを 使用するべきです。使用されるクラス/パッケージを大文字で表した名前を - 定数の接頭辞として付加してください。 - たとえば、<literal>DB::</literal> パッケージで使用する定数は、 - すべて <literal>DB_</literal> で始めます。 + 定数の接頭辞として付加してください。たとえば次のようになります。 + <informaltable> + <tgroup cols="2"> + <tbody> + <row> + <entry><simpara>DB_DATASOURCENAME</simpara></entry> + <entry><simpara>SERVICES_AMAZON_S3_LICENSEKEY</simpara></entry> + </row> + </tbody> + </tgroup> + </informaltable> <note> <simpara> <literal>true</literal>, <literal>false</literal> および @@ -779,16 +812,6 @@ </note> </para> </sect2> - <sect2> - <title>グローバル変数</title> - <para> - パッケージでグローバル変数を定義する必要がある場合、その名前は、 - アンダースコアを前後に付けたパッケージ名で始めるべきです。 - たとえば、PEAR パッケージは、 - <literal>$_PEAR_destructor_object_list</literal> - という名前のグローバル変数を使用します。 - </para> - </sect2> </sect1> <sect1 id="standards.file">
« previous php.pear.doc (#10661) next »