cvs: peardoc /ja/package/php php-compat.xml /ja/package/php/php-compat components.xml intro.xml /ja/package/php/php-compat/php-compat
loadconstant.xml loadfunction.xml

From: Date: Thu, 05 Aug 2004 11:21:51 +0000
Subject: cvs: peardoc /ja/package/php php-compat.xml /ja/package/php/php-compat components.xml intro.xml /ja/package/php/php-compat/php-compat
loadconstant.xml loadfunction.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4725@lists.php.net to get a copy of this message
haruki Thu Aug 5 07:21:51 2004 EDT Added files: /peardoc/ja/package/php php-compat.xml /peardoc/ja/package/php/php-compat components.xml intro.xml /peardoc/ja/package/php/php-compat/php-compat loadconstant.xml loadfunction.xml Log: new to ja.

http://cvs.php.net/co.php/peardoc/ja/package/php/php-compat.xml?r=1.1&p=1 Index: peardoc/ja/package/php/php-compat.xml +++ peardoc/ja/package/php/php-compat.xml <?xml version="1.0" encoding="UTF-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: haruki Status: ready --> <sect1 id="package.php.php-compat"> <title>PHP_Compat</title> <para>PHP の古いバージョンに存在しない機能を提供します。</para> &package.php.php-compat.intro; &package.php.php-compat.components; &package.php.php-compat.php-compat.loadfunction; &package.php.php-compat.php-compat.loadconstant; </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/php/php-compat/components.xml?r=1.1&p=1 Index: peardoc/ja/package/php/php-compat/components.xml +++ peardoc/ja/package/php/php-compat/components.xml <?xml version="1.0" encoding="UTF-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.16 Maintainer: haruki Status: ready --> <refentry id="package.php.php-compat.components"> <refnamediv> <refname>コンポーネント</refname> <refpurpose>コンポーネントの一覧</refpurpose> </refnamediv> <refsect1> <title>関数</title> <para>以下の関数が提供されています。</para> <table> <title>関数</title> <tgroup cols="2"> <thead> <row> <entry>関数名</entry> <entry>関数の導入</entry> </row> </thead> <tbody> <row> <entry>array_change_key_case</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>array_chunk</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>array_combine</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>array_diff_assoc</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>array_key_exists</entry> <entry>PHP 4.1.0</entry> </row> <row> <entry>array_search</entry> <entry>PHP 4.0.5</entry> </row> <row> <entry>array_udiff</entry> <entry>PHP 5</entry> </row> <row> <entry>array_udiff_assoc</entry> <entry>PHP 5</entry> </row> <row> <entry>call_user_func_array</entry> <entry>PHP 4.0.4</entry> </row> <row> <entry>constant</entry> <entry>PHP 4.0.4</entry> </row> <row> <entry>file_get_contents</entry> <entry>PHP 4.3.0</entry> </row> <row> <entry>file_put_content</entry> <entry>PHP 5</entry> </row> <row> <entry>fprintf</entry> <entry>PHP 5</entry> </row> <row> <entry>html_entity_decode</entry> <entry>PHP 4.3.0</entry> </row> <row> <entry>http_build_query</entry> <entry>PHP 5</entry> </row> <row> <entry>image_type_to_mime_type</entry> <entry>PHP 4.3.0</entry> </row> <row> <entry>is_a</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>ob_clean</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>ob_flush</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>ob_get_clean</entry> <entry>PHP 4.3.0</entry> </row> <row> <entry>ob_get_flush</entry> <entry>PHP 4.3.0</entry> </row> <row> <entry>scandir</entry> <entry>PHP 5</entry> </row> <row> <entry>str_ireplace</entry> <entry>PHP 5</entry> </row> <row> <entry>str_split</entry> <entry>PHP 5</entry> </row> <row> <entry>stripos</entry> <entry>PHP 5</entry> </row> <row> <entry>strripos</entry> <entry>PHP 5</entry> </row> <row> <entry>var_export</entry> <entry>PHP 4.2.0</entry> </row> <row> <entry>version_compare</entry> <entry>PHP 4.1.0</entry> </row> <row> <entry>vprintf</entry> <entry>PHP 4.1.0</entry> </row> <row> <entry>vsprintf</entry> <entry>PHP 4.1.0</entry> </row> </tbody> </tgroup> </table> </refsect1> <refsect1> <title>定数</title> <para>以下の定数が提供されています。</para> <table> <title>定数</title> <tgroup cols="3"> <thead> <row> <entry>ファイル名</entry> <entry>定数名</entry> <entry>定数の導入</entry> </row> </thead> <tbody> <row> <entry>E_STRICT</entry> <entry><simplelist><member>E_STRICT</member></simplelist></entry> <entry>PHP 5</entry> </row> <row> <entry>FILE</entry> <entry> <simplelist> <member>FILE_USE_INCLUDE_PATH</member> <member>FILE_IGNORE_NEW_LINES</member> <member>FILE_SKIP_EMPTY_LINES</member> <member>FILE_APPEND</member> <member>FILE_NO_DEFAULT_CONTEXT</member> </simplelist> </entry> <entry>PHP 5</entry> </row> <row> <entry>PATH_SEPARATOR</entry> <entry><simplelist><member>PATH_SEPARATOR</member></simplelist></entry> <entry>PHP 4.3.0-RC2</entry> </row> <row> <entry>STD</entry> <entry> <simplelist> <member>STDIN</member> <member>STDOUT</member> <member>STDERR</member> </simplelist> </entry> <entry>PHP 4.3.0</entry> </row> </tbody> </tgroup> </table> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/php/php-compat/intro.xml?r=1.1&p=1 Index: peardoc/ja/package/php/php-compat/intro.xml +++ peardoc/ja/package/php/php-compat/intro.xml <?xml version="1.0" encoding="UTF-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.13 Maintainer: haruki Status: ready --> <refentry id="package.php.php-compat.intro"> <refnamediv> <refname>導入</refname> <refpurpose>目的と簡単な使用例</refpurpose> </refnamediv> <refsect1> <title>概要</title> <para> PHP_Compat により、古いバージョンの PHP には存在しない機能(関数や定数) が得られます。 </para> <para> PHP_Compat が提供する関数は、対応する PHP ネイティブの関数と互換性があるように 設計されています。つまり、ネイティブの関数と同じシグネチャを持ち、同じ値を返し、同じエラーを返します。 すべての関数は、正確性の保障のため、ユニットテストが行われています。 </para> </refsect1> <refsect1> <title>例</title> <example> <title>PHP_Compat のコンポーネントをロードする</title> <programlisting role="php"> <![CDATA[ require_once 'PHP/Compat.php'; PHP_Compat::loadFunction('file_get_contents'); ]]> </programlisting> </example> <para>もし、クラスを使いたくなければ、手動でロードすることも可能です。</para> <example> <title>手動でコンポーネントをロードする</title> <programlisting role="php"> <![CDATA[ require_once 'PHP/Compat/Function/file_put_contents.php'; ]]> </programlisting> </example> <para>ロード後、関数は通常通りに使用することが可能になります。</para> <para> PHP_Compat は、簡単に使えることを目標にデザインされています。 他のパッケージ等への依存性はなく、 (エラー処理機能などの) PEAR のインフラストラクチャとは別に使用されることとなります。 </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/php/php-compat/php-compat/loadconstant.xml?r=1.1&p=1 Index: peardoc/ja/package/php/php-compat/php-compat/loadconstant.xml +++ peardoc/ja/package/php/php-compat/php-compat/loadconstant.xml <?xml version="1.0" encoding="UTF-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.13 Maintainer: haruki Status: ready --> <refentry id="package.php.php-compat.php-compat.loadconstant"> <refnamediv> <refname><function>PHP_Compat::loadConstant</function></refname> <refpurpose>定数をロードする</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'PHP/Compat.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>PHP_Compat::loadConstant</function></funcdef> <paramdef>mixed <parameter>$constant</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.php.php-compat.loadconstant.desc"> &title.desc; <para>定数をロードします。</para> </refsect1> <refsect1 id="package.php.php-compat.loadconstant.parameter"> &title.param; <para> <variablelist> <varlistentry> <term>&type.mixed; <parameter>$constant</parameter></term> <listitem><para>ロードしたい定数の名前、もしくは名前の配列</para></listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.php.php-compat.loadconstant.return"> &title.returns; <para>&type.mixed;</para> <para> <simplelist> <member>定数がロードされた場合は &true; を返す。</member> <member> 定義済みであるか定義ファイルを読み込むことができず、 定数がロードされない場合、&false; を返す。</member> <member> ロードする定数の配列を渡した場合は、&true;/&false; の配列が返されます。 </member> </simplelist> </para> </refsect1> <refsect1 id="package.php.php-compat.loadconstant.example"> &title.example; <example> <title>クラスを使って定数をロードする</title> <programlisting role="php"> <![CDATA[ <?php require_once 'PHP/Compat.php'; // load E_STRICT PHP_Compat::loadConstant('E_STRICT'); // load E_STRICT, and PATH_SEPATATOR PHP_Compat::loadConstant(array('E_STRICT', 'PATH_SEPARATOR')); // load the STD group of constants (STDIN, STDOUT, STDERR) PHP_Compat::loadConstant('STD'); ?> ]]> </programlisting> </example> <para>クラスを使わずに定数をロードすることもできます。</para> <example> <title>手動で定数をロードする</title> <programlisting role="php"> <![CDATA[ <?php require_once 'PHP/Compat/Constant/E_STRICT.php'; ?> ]]> </programlisting> </example> </refsect1> <refsect1 id="package.php.php-compat.loadconstant.note"> &title.note; &note.shouldstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/ja/package/php/php-compat/php-compat/loadfunction.xml?r=1.1&p=1 Index: peardoc/ja/package/php/php-compat/php-compat/loadfunction.xml +++ peardoc/ja/package/php/php-compat/php-compat/loadfunction.xml <?xml version="1.0" encoding="UTF-8" ?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.14 Maintainer: haruki Status: ready --> <refentry id="package.php.php-compat.php-compat.loadfunction"> <refnamediv> <refname><function>PHP_Compat::loadFunction</function></refname> <refpurpose>関数をロードする</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'PHP/Compat.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>PHP_Compat::loadFunction</function></funcdef> <paramdef>mixed <parameter>$function</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.php.php-compat.loadfunction.desc"> &title.desc; <para>関数をロードします。</para> </refsect1> <refsect1 id="package.php.php-compat.loadfunction.parameter"> &title.param; <para> <variablelist> <varlistentry> <term>&type.mixed; <parameter>$function</parameter></term> <listitem><para>ロードしたい関数の名前、もしくは関数の配列</para></listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.php.php-compat.loadfunction.return"> &title.returns; <para>&type.mixed;</para> <para> <simplelist> <member>関数がロードされた場合は、&true; を返します。</member> <member> 定義済みであるか定義ファイルをロードできず、関数がロードされない場合、 &false; を返します。 </member> <member> ロードする関数の配列を渡した場合は、&true;/&false; の配列が返されます。 </member> </simplelist> </para> </refsect1> <refsect1 id="package.php.php-compat.loadfunction.example"> &title.example; <example> <title>クラスを使って関数をロードする</title> <programlisting role="php"> <![CDATA[ <?php require_once 'PHP/Compat.php'; // load file_put_contents PHP_Compat::loadFunction('file_put_contents'); // load str_split, array_chunk and file_get_contents PHP_Compat::loadFunction(array('str_split', 'array_chunk', 'file_get_contents')); ?> ]]> </programlisting> </example> <para>クラスを使わずに関数をロードすることもできます。</para> <example> <title>手動で関数をロードする</title> <programlisting role="php"> <![CDATA[ <?php require_once 'PHP/Compat/Function/file_put_contents.php'; ?> ]]> </programlisting> </example> </refsect1> <refsect1 id="package.php.php-compat.loadfunction.note"> &title.note; &note.shouldstatic; </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#4725) next »