cvs: peardoc /ja/chapters installation.xml /ja/chapters/installation manually.xml shared.xml /ja/package/html html-tagcloud.xml
/ja/package/html/html-template-sigma/html-template-sigma touchblock.xml /ja/package/php/phpunit testcase.xml /ja/package/system system-procwatch.xml
/ja/package/system/system-procwatch system-procwatch-config.xml system-procwatch-parser.xml system-procwatch.xml /ja/package/text
text-highlighter.xml /ja/package/text/text-highlighter intro.xml oc.xml usage.xml

From: Date: Sat, 12 Jan 2008 06:11:34 +0000
Subject: cvs: peardoc /ja/chapters installation.xml /ja/chapters/installation manually.xml shared.xml /ja/package/html html-tagcloud.xml
/ja/package/html/html-template-sigma/html-template-sigma touchblock.xml /ja/package/php/phpunit testcase.xml /ja/package/system system-procwatch.xml
/ja/package/system/system-procwatch system-procwatch-config.xml system-procwatch-parser.xml system-procwatch.xml /ja/package/text
text-highlighter.xml /ja/package/text/text-highlighter intro.xml oc.xml usage.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-10364@lists.php.net to get a copy of this message
takagi Sat Jan 12 06:11:34 2008 UTC Added files: /peardoc/ja/package/text/text-highlighter usage.xml oc.xml /peardoc/ja/chapters/installation manually.xml Modified files: /peardoc/ja/package/text/text-highlighter intro.xml /peardoc/ja/package/text text-highlighter.xml /peardoc/ja/package/system/system-procwatch system-procwatch.xml system-procwatch-parser.xml system-procwatch-config.xml /peardoc/ja/package/system system-procwatch.xml /peardoc/ja/package/php/phpunit testcase.xml /peardoc/ja/package/html/html-template-sigma/html-template-sigma touchblock.xml /peardoc/ja/package/html html-tagcloud.xml /peardoc/ja/chapters/installation shared.xml /peardoc/ja/chapters installation.xml Log: sync with en.

http://cvs.php.net/viewvc.cgi/peardoc/ja/package/text/text-highlighter/intro.xml?r1=1.5&r2=1.6&diff_format=u Index: peardoc/ja/package/text/text-highlighter/intro.xml diff -u peardoc/ja/package/text/text-highlighter/intro.xml:1.5 peardoc/ja/package/text/text-highlighter/intro.xml:1.6 --- peardoc/ja/package/text/text-highlighter/intro.xml:1.5 Wed Jan 2 04:21:41 2008 +++ peardoc/ja/package/text/text-highlighter/intro.xml Sat Jan 12 06:11:33 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.7 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.8 Maintainer: takagi Status: ready --> <sect2 id="package.text.text-highlighter.intro"> <title>Introduction</title> @@ -98,182 +98,3 @@ </itemizedlist> </sect2> - - <sect2 id="package.text.text-highlighter.usage"> - <title>使用法</title> - - <para> - <classname>Text_Highlighter</classname> クラスには - シンタックスハイライティングを行うために必要な機能がすべて含まれています。 - ただし、各種フォーマットに対する強調ルールは除きます。 - これらのルールは <classname>Text_Highlighter</classname> - のサブクラスで定義されていますが、 - このサブクラスのインスタンスを直接作成する必要はありません。 - オブジェクト指向なファクトリパターンを用いて、 - フォーマットに応じたオブジェクトを作成します。 - </para> - - <example> - <title>SQL クエリのハイライティング</title> - - <programlisting role="php"> - <![CDATA[ -require_once "Text/Highlighter.php"; - -$hlSQL =& Text_Highlighter::factory("SQL"); -echo $hlSQL->highlight("SELECT * FROM some_table WHERE id = 12"); - ]]> - </programlisting> - - <para> - このコードは、<methodname>Text_Highlighter::highlight</methodname> - に渡された SQL の SELECT クエリの構文を強調した - HTML を作成します。出力をカスタマイズし、 - 例えばコンソール用に適した形式とすることも可能です。この方法については - <link linkend="package.text.text-highlighter.oc"> - 出力のカスタマイズ</link> で説明します。 - </para> - </example> - - <para> - その他のフォーマットについてのシンタックスハイライティングを行うには - <methodname>Text_Highlighter::factory</methodname> の引数の値 <literal>SQL</literal> - を以下のいずれかに変更する必要があります。 - <literal>ABAP</literal>、<literal>CPP</literal>、<literal>CSS</literal>、<literal>DIFF</literal>、 - <literal>DTD</literal>、<literal>HTML</literal>、<literal>JAVA</literal>、 - <literal>JAVASCRIPT</literal>、<literal>MYSQL</literal>、 - <literal>PERL</literal>、<literal>PHP</literal>、 - <literal>PYTHON</literal>、<literal>RUBY</literal>、<literal>SQL</literal>、 - あるいは <literal>XML</literal>。 - </para> - </sect2> - - <sect2 id="package.text.text-highlighter.oc"> - <title>出力のカスタマイズ</title> - - <para> - デフォルトでは、<classname>Text_Highlighter</classname> - は、入力内容の構文を強調した HTML を作成します。 - </para> - - <para> - 作成される出力結果を変更し、 - <command>xterm</command> のようなカラー対応端末や - <command>less(1)</command> に適した形式とすることも可能です。 - そのためには、<classname>Text_Highlighter</classname> - に対して別のレンダラを使用するように指示します。 - </para> - - <example> - <title>コンソールレンダラの使用法</title> - - <programlisting role="php"> - <![CDATA[ -require_once "Text/Highlighter.php"; -require_once "Text/Highlighter/Renderer/Console.php"; - -$hlSQL =& Text_Highlighter::factory("SQL"); -$hlSQL->setRenderer(new Text_Highlighter_Renderer_Console); -echo $hlSQL->highlight("SELECT * FROM some_table WHERE id = 12"); - ]]> - </programlisting> - </example> - - <para> - HTML レンダラやコンソールレンダラの出力結果をさらにカスタマイズすることも可能です。 - その場合は、コンストラクタにオプションの連想配列を渡します。 - </para> - - <example> - <title>HTML レンダラのオプション</title> - - <programlisting role="php"> - <![CDATA[ -require_once "Text/Highlighter.php"; -require_once "Text/Highlighter/Renderer/Html.php"; - -$renderer = new Text_Highlighter_Renderer_Html(array("numbers" => HL_NUMBERS_LI, "tabsize" => 4)); - -$hlJava =& Text_Highlighter::factory("JAVA"); -$hlJava->setRenderer($renderer); - -echo $hlJava->highlight('class JavaProgram { - public static void main(String args[]) { - System.out.println("Hello World!"); - } -}'); - ]]> - </programlisting> - - <para> - 上の例は、HTML レンダラに対してふたつのオプションを指定しています。 - まず <literal>&lt;ol /&gt;</literal> HTML タグを使用して行番号を表示させるようにし、 - 次に字下げをスペース 4 文字に指定しています。 - </para> - </example> - - <para> - 以下のオプションが使用可能です。 - </para> - - <table> - <title>レンダラクラスで使用可能なオプション</title> - - <tgroup cols="5"> - <colspec colname="option" /> - <colspec colname="description" /> - <colspec colname="inHTML" /> - <colspec colname="inConsole" /> - <colspec colname="hints"/> - - <thead> - <row> - <entry>名前</entry> - <entry>説明</entry> - <entry>HTML レンダラで使用可能?</entry> - <entry>コンソールレンダラで使用可能?</entry> - <entry>ヒント</entry> - </row> - </thead> - <tbody> - <row> - <entry align="center"><literal>numbers</literal></entry> - <entry>行番号の形式</entry> - <entry align="center">yes</entry> - <entry align="center">yes</entry> - <entry> - コンソールレンダラの場合、このオプションは単に - &true; あるいは &false; を指定します。これらはそれぞれ - 出力する/出力しない という意味です。HTML レンダラでは、 - 次の三種類のうちのいずれかを指定します。 - <constant>HL_NUMBERS_LI</constant> は、HTML の - <literal>&lt;ol /&gt;</literal> タグを使用して行番号を出力します。 - <constant>HL_NUMBERS_TABLE</constant> は、 - カラム数が 2 のテーブルを作成します。そして最初のカラムに行番号、 - 次のカラムにソースコードを出力します。 - &false; を指定すると、HTML レンダラで行番号を出力しなくなります。 - </entry> - </row> - <row> - <entry align="center"><literal>tabsize</literal></entry> - <entry>タブの幅</entry> - <entry align="center">yes</entry> - <entry align="center">yes</entry> - <entry /> - </row> - <row> - <entry align="center"><literal>colors</literal></entry> - <entry>追加の色</entry> - <entry align="center">no</entry> - <entry align="center">yes</entry> - <entry> - 連想配列形式で、 - カラー対応のコンソールにおける追加の色を指定します。 - 連想配列のキーが色の名前となり、対応するエスケープシーケンス - (例えば <literal>\033[1;31mRed</literal>) を連想配列の値として指定します。 - </entry> - </row> - </tbody> - </tgroup> - </table> - </sect2> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/text/text-highlighter.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/text/text-highlighter.xml diff -u peardoc/ja/package/text/text-highlighter.xml:1.1 peardoc/ja/package/text/text-highlighter.xml:1.2 --- peardoc/ja/package/text/text-highlighter.xml:1.1 Sat Sep 16 09:38:14 2006 +++ peardoc/ja/package/text/text-highlighter.xml Sat Jan 12 06:11:33 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <sect1 id="package.text.text-highlighter"> <title>Text_Highlighter</title> @@ -10,6 +10,8 @@ </para> &package.text.text-highlighter.intro; + &package.text.text-highlighter.usage; + &package.text.text-highlighter.oc; </sect1> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/peardoc/ja/package/system/system-procwatch/system-procwatch.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/system/system-procwatch/system-procwatch.xml diff -u peardoc/ja/package/system/system-procwatch/system-procwatch.xml:1.1 peardoc/ja/package/system/system-procwatch/system-procwatch.xml:1.2 --- peardoc/ja/package/system/system-procwatch/system-procwatch.xml:1.1 Sat Sep 16 09:38:14 2006 +++ peardoc/ja/package/system/system-procwatch/system-procwatch.xml Sat Jan 12 06:11:33 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="package.system.system-procwatch.system-procwatch"> <refnamediv> <refname><classname>System_ProcWatch</classname></refname> @@ -19,12 +19,6 @@ </para> </refsect1> </refentry> - -&package.system.system-procwatch.system-procwatch.system-procwatch; -&package.system.system-procwatch.system-procwatch.run; -&package.system.system-procwatch.system-procwatch.daemon; -&package.system.system-procwatch.system-procwatch.setconfig; - <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/peardoc/ja/package/system/system-procwatch/system-procwatch-parser.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/system/system-procwatch/system-procwatch-parser.xml diff -u peardoc/ja/package/system/system-procwatch/system-procwatch-parser.xml:1.1 peardoc/ja/package/system/system-procwatch/system-procwatch-parser.xml:1.2 --- peardoc/ja/package/system/system-procwatch/system-procwatch-parser.xml:1.1 Sat Sep 16 09:38:14 2006 +++ peardoc/ja/package/system/system-procwatch/system-procwatch-parser.xml Sat Jan 12 06:11:33 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.system.system-procwatch.system-procwatch-parser"> <refnamediv> <refname><classname>System_ProcWatch_Parser</classname></refname> @@ -17,14 +17,6 @@ </para> </refsect1> </refentry> - -&package.system.system-procwatch.system-procwatch-parser.system-procwatch-parser; -&package.system.system-procwatch.system-procwatch-parser.getparseddata; -&package.system.system-procwatch.system-procwatch-parser.fetch; -&package.system.system-procwatch.system-procwatch-parser.parse; -&package.system.system-procwatch.system-procwatch-parser.getprocbypid; -&package.system.system-procwatch.system-procwatch-parser.getprocinfo; - <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/peardoc/ja/package/system/system-procwatch/system-procwatch-config.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/system/system-procwatch/system-procwatch-config.xml diff -u peardoc/ja/package/system/system-procwatch/system-procwatch-config.xml:1.1 peardoc/ja/package/system/system-procwatch/system-procwatch-config.xml:1.2 --- peardoc/ja/package/system/system-procwatch/system-procwatch-config.xml:1.1 Sat Sep 16 09:38:14 2006 +++ peardoc/ja/package/system/system-procwatch/system-procwatch-config.xml Sat Jan 12 06:11:33 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.system.system-procwatch.system-procwatch-config"> <refnamediv> <refname><classname>System_ProcWatch_Config</classname></refname> @@ -18,12 +18,6 @@ </para> </refsect1> </refentry> - -&package.system.system-procwatch.system-procwatch-config.fromxml; -&package.system.system-procwatch.system-procwatch-config.fromxmlfile; -&package.system.system-procwatch.system-procwatch-config.frominifile; -&package.system.system-procwatch.system-procwatch-config.fromarray; - <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/peardoc/ja/package/system/system-procwatch.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/system/system-procwatch.xml diff -u peardoc/ja/package/system/system-procwatch.xml:1.1 peardoc/ja/package/system/system-procwatch.xml:1.2 --- peardoc/ja/package/system/system-procwatch.xml:1.1 Sat Sep 16 09:38:14 2006 +++ peardoc/ja/package/system/system-procwatch.xml Sat Jan 12 06:11:33 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <sect1 id="package.system.system-procwatch"> <title>System_ProcWatch</title> @@ -9,13 +9,35 @@ このパッケージは、 Unix 系のシステム上でシステムプロセスを監視するメソッドを提供します。 </para> - + <sect2 id="package.system.system-procwatch.intro-and-features"> + <title>導入および機能説明</title> &package.system.system-procwatch.intro; &package.system.system-procwatch.constants; &package.system.system-procwatch.system-procwatch; + &package.system.system-procwatch.system-procwatch.system-procwatch; + &package.system.system-procwatch.system-procwatch.run; + &package.system.system-procwatch.system-procwatch.daemon; + &package.system.system-procwatch.system-procwatch.setconfig; + </sect2> + <sect2 id="package.system.system-procwatch.config"> + <title>設定</title> &package.system.system-procwatch.system-procwatch-config; + &package.system.system-procwatch.system-procwatch-config.fromxml; + &package.system.system-procwatch.system-procwatch-config.fromxmlfile; + &package.system.system-procwatch.system-procwatch-config.frominifile; + &package.system.system-procwatch.system-procwatch-config.fromarray; + </sect2> + + <sect2 id="package.system.system-procwatch.parser"> + <title>パーサの情報</title> &package.system.system-procwatch.system-procwatch-parser; - + &package.system.system-procwatch.system-procwatch-parser.system-procwatch-parser; + &package.system.system-procwatch.system-procwatch-parser.getparseddata; + &package.system.system-procwatch.system-procwatch-parser.fetch; + &package.system.system-procwatch.system-procwatch-parser.parse; + &package.system.system-procwatch.system-procwatch-parser.getprocbypid; + &package.system.system-procwatch.system-procwatch-parser.getprocinfo; + </sect2> </sect1> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/ja/package/php/phpunit/testcase.xml?r1=1.4&r2=1.5&diff_format=u Index: peardoc/ja/package/php/phpunit/testcase.xml diff -u peardoc/ja/package/php/phpunit/testcase.xml:1.4 peardoc/ja/package/php/phpunit/testcase.xml:1.5 --- peardoc/ja/package/php/phpunit/testcase.xml:1.4 Wed Oct 20 11:09:00 2004 +++ peardoc/ja/package/php/phpunit/testcase.xml Sat Jan 12 06:11:33 2008 @@ -1,6 +1,6 @@ <?xml encoding="utf-8" ?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.2 Maintainer: haruki Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.3 Maintainer: haruki Status: ready --> <!-- CREDITS: hirokawa --> <refentry id="package.php.phpunit.testcase"> <refnamediv> @@ -23,9 +23,6 @@ </para> </refsect1> </refentry> - - <!-- &package.php.phpunit.testcase.example; --> - &package.php.phpunit.testcase.counttestcases; <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/peardoc/ja/package/html/html-template-sigma/html-template-sigma/touchblock.xml?r1=1.1&r2=1.2&diff_format=u Index: peardoc/ja/package/html/html-template-sigma/html-template-sigma/touchblock.xml diff -u peardoc/ja/package/html/html-template-sigma/html-template-sigma/touchblock.xml:1.1 peardoc/ja/package/html/html-template-sigma/html-template-sigma/touchblock.xml:1.2 --- peardoc/ja/package/html/html-template-sigma/html-template-sigma/touchblock.xml:1.1 Wed Jan 3 01:45:18 2007 +++ peardoc/ja/package/html/html-template-sigma/html-template-sigma/touchblock.xml Sat Jan 12 06:11:33 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="package.html.html-template-sigma.html-template-sigma.touchblock"> <refnamediv> <refname>touchBlock()</refname> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/html/html-tagcloud.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/package/html/html-tagcloud.xml diff -u peardoc/ja/package/html/html-tagcloud.xml:1.2 peardoc/ja/package/html/html-tagcloud.xml:1.3 --- peardoc/ja/package/html/html-tagcloud.xml:1.2 Sat Feb 3 02:25:32 2007 +++ peardoc/ja/package/html/html-tagcloud.xml Sat Jan 12 06:11:34 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> -<!-- EN-Revision: 1.2 Maintainer: shomas Status: ready --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.3 Maintainer: shomas Status: ready --> <sect1 id="package.html.html-tagcloud"> <title>HTML_TagCloud</title> <para> http://cvs.php.net/viewvc.cgi/peardoc/ja/chapters/installation/shared.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/ja/chapters/installation/shared.xml diff -u peardoc/ja/chapters/installation/shared.xml:1.2 peardoc/ja/chapters/installation/shared.xml:1.3 --- peardoc/ja/chapters/installation/shared.xml:1.2 Sat Sep 8 03:23:13 2007 +++ peardoc/ja/chapters/installation/shared.xml Sat Jan 12 06:11:34 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 --> <sect1 id="installation.shared"> <title>共有ホストでの PEAR のローカルコピーのインストール</title> @@ -443,25 +443,6 @@ </sect3> </sect2> </sect1> - - <sect1 id="installation.manually"> - <title>手動インストール</title> - <warning> - <para> - この章は削除されました。その理由としては、手動インストールを行うためには - パッケージがどのようにして生成され、インストールの際にどのようなプロセスが - 実行されるかについての詳しい理解が必要となるからです。 - PEAR インストーラなしでパッケージをインストールしてみたいなら、 - デベロッパーズガイドの <filename>package.xml</filename> についてのセクション - (<xref linkend="developers.packagedef"/> および <xref linkend="guide.developers.package2"/>) - を参照すると良いでしょう。 - </para> - <para> - PEAR をシェルアクセス無しでリモートホストにインストールする場合は、 - <xref linkend="installation.shared"/> を参照してください。 - </para> - </warning> - </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/peardoc/ja/chapters/installation.xml?r1=1.10&r2=1.11&diff_format=u Index: peardoc/ja/chapters/installation.xml diff -u peardoc/ja/chapters/installation.xml:1.10 peardoc/ja/chapters/installation.xml:1.11 --- peardoc/ja/chapters/installation.xml:1.10 Sun Nov 26 08:40:55 2006 +++ peardoc/ja/chapters/installation.xml Sat Jan 12 06:11:34 2008 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> -<!-- $Revision: 1.10 $ --> -<!-- EN-Revision: 1.47 Maintainer: haruki Status: ready --> +<!-- $Revision: 1.11 $ --> +<!-- EN-Revision: 1.48 Maintainer: haruki Status: ready --> <!-- CREDITS: --> <chapter id="installation"> <chapterinfo> @@ -19,6 +19,7 @@ &chapters.installation.getting; &chapters.installation.cli; &chapters.installation.shared; + &chapters.installation.manually; &chapters.installation.cvs; &chapters.installation.pecl; </chapter> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/text/text-highlighter/usage.xml?view=markup&rev=1.1 Index: peardoc/ja/package/text/text-highlighter/usage.xml +++ peardoc/ja/package/text/text-highlighter/usage.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <sect2 id="package.text.text-highlighter.usage"> <title>使用法</title> <para> <classname>Text_Highlighter</classname> クラスには シンタックスハイライティングを行うために必要な機能がすべて含まれています。 ただし、各種フォーマットに対する強調ルールは除きます。 これらのルールは <classname>Text_Highlighter</classname> のサブクラスで定義されていますが、 このサブクラスのインスタンスを直接作成する必要はありません。 オブジェクト指向なファクトリパターンを用いて、 フォーマットに応じたオブジェクトを作成します。 </para> <example> <title>SQL クエリのハイライティング</title> <programlisting role="php"> <![CDATA[ require_once "Text/Highlighter.php"; $hlSQL =& Text_Highlighter::factory("SQL"); echo $hlSQL->highlight("SELECT * FROM some_table WHERE id = 12"); ]]> </programlisting> <para> このコードは、<methodname>Text_Highlighter::highlight</methodname> に渡された SQL の SELECT クエリの構文を強調した HTML を作成します。出力をカスタマイズし、 例えばコンソール用に適した形式とすることも可能です。この方法については <link linkend="package.text.text-highlighter.oc"> 出力のカスタマイズ</link> で説明します。 </para> </example> <para> その他のフォーマットについてのシンタックスハイライティングを行うには <methodname>Text_Highlighter::factory</methodname> の引数の値 <literal>SQL</literal> を以下のいずれかに変更する必要があります。 <literal>ABAP</literal>、<literal>CPP</literal>、<literal>CSS</literal>、<literal>DIFF</literal>、 <literal>DTD</literal>、<literal>HTML</literal>、<literal>JAVA</literal>、 <literal>JAVASCRIPT</literal>、<literal>MYSQL</literal>、 <literal>PERL</literal>、<literal>PHP</literal>、 <literal>PYTHON</literal>、<literal>RUBY</literal>、<literal>SQL</literal>、 あるいは <literal>XML</literal>。 </para> </sect2> http://cvs.php.net/viewvc.cgi/peardoc/ja/package/text/text-highlighter/oc.xml?view=markup&rev=1.1 Index: peardoc/ja/package/text/text-highlighter/oc.xml +++ peardoc/ja/package/text/text-highlighter/oc.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <sect2 id="package.text.text-highlighter.oc"> <title>出力のカスタマイズ</title> <para> デフォルトでは、<classname>Text_Highlighter</classname> は、入力内容の構文を強調した HTML を作成します。 </para> <para> 作成される出力結果を変更し、 <command>xterm</command> のようなカラー対応端末や <command>less(1)</command> に適した形式とすることも可能です。 そのためには、<classname>Text_Highlighter</classname> に対して別のレンダラを使用するように指示します。 </para> <example> <title>コンソールレンダラの使用法</title> <programlisting role="php"> <![CDATA[ require_once "Text/Highlighter.php"; require_once "Text/Highlighter/Renderer/Console.php"; $hlSQL =& Text_Highlighter::factory("SQL"); $hlSQL->setRenderer(new Text_Highlighter_Renderer_Console); echo $hlSQL->highlight("SELECT * FROM some_table WHERE id = 12"); ]]> </programlisting> </example> <para> HTML レンダラやコンソールレンダラの出力結果をさらにカスタマイズすることも可能です。 その場合は、コンストラクタにオプションの連想配列を渡します。 </para> <example> <title>HTML レンダラのオプション</title> <programlisting role="php"> <![CDATA[ require_once "Text/Highlighter.php"; require_once "Text/Highlighter/Renderer/Html.php"; $renderer = new Text_Highlighter_Renderer_Html(array("numbers" => HL_NUMBERS_LI, "tabsize" => 4)); $hlJava =& Text_Highlighter::factory("JAVA"); $hlJava->setRenderer($renderer); echo $hlJava->highlight('class JavaProgram { public static void main(String args[]) { System.out.println("Hello World!"); } }'); ]]> </programlisting> <para> 上の例は、HTML レンダラに対してふたつのオプションを指定しています。 まず <literal>&lt;ol /&gt;</literal> HTML タグを使用して行番号を表示させるようにし、 次に字下げをスペース 4 文字に指定しています。 </para> </example> <para> 以下のオプションが使用可能です。 </para> <table> <title>レンダラクラスで使用可能なオプション</title> <tgroup cols="5"> <colspec colname="option" /> <colspec colname="description" /> <colspec colname="inHTML" /> <colspec colname="inConsole" /> <colspec colname="hints"/> <thead> <row> <entry>名前</entry> <entry>説明</entry> <entry>HTML レンダラで使用可能?</entry> <entry>コンソールレンダラで使用可能?</entry> <entry>ヒント</entry> </row> </thead> <tbody> <row> <entry align="center"><literal>numbers</literal></entry> <entry>行番号の形式</entry> <entry align="center">yes</entry> <entry align="center">yes</entry> <entry> コンソールレンダラの場合、このオプションは単に &true; あるいは &false; を指定します。これらはそれぞれ 出力する/出力しない という意味です。HTML レンダラでは、 次の三種類のうちのいずれかを指定します。 <constant>HL_NUMBERS_LI</constant> は、HTML の <literal>&lt;ol /&gt;</literal> タグを使用して行番号を出力します。 <constant>HL_NUMBERS_TABLE</constant> は、 カラム数が 2 のテーブルを作成します。そして最初のカラムに行番号、 次のカラムにソースコードを出力します。 &false; を指定すると、HTML レンダラで行番号を出力しなくなります。 </entry> </row> <row> <entry align="center"><literal>tabsize</literal></entry> <entry>タブの幅</entry> <entry align="center">yes</entry> <entry align="center">yes</entry> <entry /> </row> <row> <entry align="center"><literal>colors</literal></entry> <entry>追加の色</entry> <entry align="center">no</entry> <entry align="center">yes</entry> <entry> 連想配列形式で、 カラー対応のコンソールにおける追加の色を指定します。 連想配列のキーが色の名前となり、対応するエスケープシーケンス (例えば <literal>\033[1;31mRed</literal>) を連想配列の値として指定します。 </entry> </row> </tbody> </tgroup> </table> </sect2> http://cvs.php.net/viewvc.cgi/peardoc/ja/chapters/installation/manually.xml?view=markup&rev=1.1 Index: peardoc/ja/chapters/installation/manually.xml +++ peardoc/ja/chapters/installation/manually.xml <?xml version="1.0" encoding="UTF-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <sect1 id="installation.manually"> <title>手動でのインストール</title> <warning> <para> このセクションの説明は削除しました。 手動でのインストールを行うには、 パッケージの構造やインストールの流れなどに関する深い理解が必要となるからです。 どうしても PEAR インストーラなしでインストールしたいという場合は、 開発者向けガイド (<xref linkend="developers.packagedef"/> および <xref linkend="guide.developers.package2"/>) で <filename>package.xml</filename> についての説明を読んでください。 </para> <para> シェルが利用できないリモートホストに PEAR をインストールしたい場合は <xref linkend="installation.shared"/> を参照ください。 </para> </warning> </sect1>
« previous php.pear.doc (#10364) next »