PEARで提供しているパッケージ(list-all)
PEARで提供するライブラリは、各目的毎にパッケージという単位で配布されています。使いたい機能を持つパッケージをインストールすることでPHPプログラムから利用が可能となります。そこでまずはどのようなパッケージが用意されているかを確認しておきましょう。
下記のPEARの公式サイトを見てください。
上部メニューの中にある「Packages」と書かれたリンクをクリックして下さい。
現在PEAR本家で提供されているパッケージの一覧が表示されます。2008年9月時点で516のパッケージが登録されています。
このページではカテゴリ毎にパッケージが分類されています。では「Authentication」と書かれたリンクをクリックして下さい。
認証に関するPEARパッケージは現在8個あり「Auth」「Auth_HTTP」「Auth_PrefManager」「Auth_PrefManager2」「Auth_RADIUS」「Auth_SASL」「LiveUser」「LiveUser_Admin」であることが分かります。
ではPackage nameの中で「Auth」と書かれたリンクをクリックして下さい。
「Auth」パッケージに関する簡単な情報を確認することが出来ます。
なおPEARパッケージは公式サイト以外でも配布が可能となっています。配布元はチャネルという名前で管理され、チャネルを指定してパッケージを取得します。公式サイトのチャネルは「pear.php.net」です。
pearコマンドでパッケージ一覧を取得
先ほどはPEARの公式サイト上で表示されているパッケージ一覧を見てみましたが、pearコマンドを使って現在提供されているパッケージ一覧を取得することが出来ます。
パッケージ一覧を取得するには「list-all」コマンドを使います。
D:¥php>pear help list-all pear list-all [options] Lists the packages available on the configured server along with the latest stable release of each package. Options: -c CHAN, --channel=CHAN specify a channel other than the default channel -i, --channelinfo output fully channel-aware data, even on failure D:¥php>
ではコマンドプロンプトにて「pear list-all」と入力してEnterキーを押して下さい。(結果が出るまでに少し時間がかかります)
D:¥php>pear list-all ALL PACKAGES [CHANNEL PEAR.PHP.NET]: ==================================== PACKAGE LATEST LOCAL pear/Benchmark 1.2.7 Framework to benchmark PHP scripts or fun ction calls. pear/Config 1.10.11 Your configuration's swiss-army knife. pear/Gtk_VarDump 1.0.0 A simple GUI to example php data trees pear/Gtk_ScrollingLabel 1.0.0 A scrolling label for PHP-Gtk pear/Gtk_FileDrop 1.0.2 Make Gtk widgets accept file drops pear/Gtk_Styled 1.0.0 PHP-GTK pseudo-widgets that mimic GtkData based objects and allow the look and feel to be controlled by the programmer. pear/Log 1.11.2 Logging Framework pear/Numbers_Roman 1.0.2 Provides methods for converting to and fr om Roman Numerals. pear/Numbers_Words 0.15.0 The PEAR Numbers_Words package provides m ethods for spelling numerals in words. pear/FSM 1.3.0 Finite State Machine pear/QA_Peardoc_Coverage 1.1.1 PEAR documentation coverage analysis. pear/Science_Chemistry 1.1.0 Classes to manipulate chemical objects: a toms, molecules, etc. pear/Services_Akismet Services_Akismet is a package to use Akis met spam-filtering from PHP pear/Stream_SHM 1.0.0 Shared Memory Stream pear/Stream_Var 1.0.0 Allows stream based access to any variabl e. pear/VersionControl_SVN 0.3.1 Simple OO wrapper interface for the Subve rsion command-line client. pear/Archive_Tar 1.3.2 Tar file management class pear/Console_Getopt 1.2.3 Command-line option parser pear/PEAR 1.7.1 PEAR Base System pear/Structures_Graph 1.0.2 Graph datastructure manipulation library D:¥php>
※パッケージの一覧が表示されるはずなのですが、数があきらかに少ないです。何か勘違いしているかもしれませんので、確認できましたらこのページは再度更新します。
( Written by Tatsuo Ikura )