ずいぶん前にPHPDocを取り上げてあれこれ触ってみましたが、いつの間にかPEARマニュアルからページがなくなっていました。現在ではPHPDocの代わりに、高機能なphpDocumentorがPEARに追加されています。 phpDocumentor本家 PEARマニュアルのphpDocumentorのページ 基本的にはPHPDocと同じ「APIドキュメントを自動生成する」という機能だけなのですが出力形式が多様で、HTMLだけでもデザインテンプレートが何種類も用意されており、pear.php.netにあるAPIドキュメントでも採用されています。HTML以外にもPDF形式やWindowsのヘルプファイル用hhpファイル(別途コンパイルが必要)、はたまたpeardoc用docbookも出力できてしまいます。 今回はインストールからざっとした使い方までやってみました。 まずはインストールです。お決
プログラムでドキュメントを書くのって面倒ですよね。 そこで javadoc 風なドキュメントを作成してくれる phpDocumentor の紹介です。 スクリプト中に /** * 概要 * phpDocumentorのサンプルです * * 説明 * phpDocumentorによって作成されました。 * * @param string $arg 説明 * * @return string 説明 */ function PACKAGE_fooFunc(){ } のような感じでコメントを書いておけばドキュメント化してくれます。 phpDocumentor用コメントの書き方 インストール phpDocumentor は pear でもインストールできますが、 今回は本家からファイルをダウンロードして進めます。 まず、ここからダウンロードします。 解凍すると、 のようにファイルが沢山できます。 (
javaにはjavadocと言う、ソースファイルからjavaのリファレンスマニュアルを生成してくれるコマンドがありますが、phpにも同様のものとしてphpDocumentorがあります。これはPEARパッケージの1つとして提供されていて、PEARを導入していれば簡単にインストールが可能です。 phpDocumentorの特徴としては、ドキュメントのoutput形式として、下記のようなフォーマットがサポートされています。 html(複数のテンプレートから選択が可能) PDF Windows Help インストールはpearコマンドで簡単にインストール出来ますが、memory_limitがデフォルト値(8M)のままだとメモリー不足でインストール出来ませんでした、php.iniを修正してmemory_limitを16Mに増やせば問題なくインストール出来きました。 ;;;;;;;;;;;;;;;;
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く