<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHPプログラマのバリ・ポジ情報ブログ &#187; phpdocumentor</title>
	<atom:link href="http://blog.veryposi.info/tag/phpdocumentor/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.veryposi.info</link>
	<description>PHP,JavaScriptやサーバーの設定などのプログラミングに関する情報をバリ・ポジティブに発信しているプログラマのブログ、『バリ・ポジ』</description>
	<lastBuildDate>Thu, 10 May 2012 06:23:01 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PHPのドキュメント作成にPhpDocumentorを使ってみる コメントの書き方</title>
		<link>http://blog.veryposi.info/programing/php/phpdocumentor-2/</link>
		<comments>http://blog.veryposi.info/programing/php/phpdocumentor-2/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 01:29:02 +0000</pubDate>
		<dc:creator>gensan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpdocumentor]]></category>

		<guid isPermaLink="false">http://blog.veryposi.info/?p=805</guid>
		<description><![CDATA[PhpDocumentorを使用する場合のコメントの書き方についてのまとめです。 PhpDocumentorの使い方については以前に書いた記事があるのでこちらを見てください。 自分が書くときの備忘録なので、詳しい内容が知 [...]]]></description>
			<content:encoded><![CDATA[<p>PhpDocumentorを使用する場合のコメントの書き方についてのまとめです。</p>
<p>PhpDocumentorの使い方については以前に書いた記事があるので<a href="http://blog.veryposi.info/programing/php/phpdocumentor/">こちら</a>を見てください。</p>
<p>自分が書くときの備忘録なので、詳しい内容が知りたい方はPhpDocumentorのドキュメントを見てください。</p>
<h3>クラスを記述する時のコメント</h3>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
2
3
4
5
6
7
8
9
10
11
12
13
</pre>
</td>
<td class="code">
<pre class="php"><span style="color: rgb(128, 128, 128); font-style: italic;">/**
 * DB管理ツールクラス
 *
 * 以下の機能を保持しているクラス
 * テーブルの作成、データの登録、更新、削除、検索ができる。
 * データのインポート、エクスポート機能
 *
 * @access public
 * @author Masaru Hashizume
 * @copyright Copyright (c) 2009, Masaru Hashizume
 * @version 1.00
 * @since 2009/02/21
 */</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>プロパティ／変数に記述する時のコメント</h3>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<p>1<br />
            2<br />
            3</p>
</td>
<td class="code">
<p><span style="color: rgb(128, 128, 128); font-style: italic;">/**<br />
            * PDO<br />
            */</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<h3>関数／メソッドに記述する時のコメント</h3>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
2
3
4
5
6
7
8
</pre>
</td>
<td class="code">
<pre class="php"><span style="color: rgb(128, 128, 128); font-style: italic;">/**
 *
 * NewEntryテーブルにデータを登録する
 *
 * @access public
 * @param  array 登録データ
 * @return void
 */</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>コメントに使用する記述内容一覧</h3>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
2
3
4
5
6
7
8
9
10
</pre>
</td>
<td class="code">
<pre class="php">
@abstract
@final
@access <span style="color: rgb(0, 0, 0); font-weight: bold;">public</span>
@author Masaru Hashizume
@copyright Copyright <span style="color: rgb(102, 204, 102);">(</span>c<span style="color: rgb(102, 204, 102);">)</span> <span style="color: rgb(204, 102, 204);">2002</span>, Masaru Hashizume
@param bool <span style="color: rgb(0, 0, 255);">$baz</span>
@<span style="color: rgb(177, 177, 0);">return</span> mixed
@version <span style="color: rgb(204, 102, 204);">1.00</span>
@see <span style="color: rgb(0, 0, 0); font-weight: bold;">function</span> parent_method
@since <span style="color: rgb(204, 102, 204);">2009</span>/<span style="color: rgb(204, 102, 204);">03</span>/<span style="color: rgb(204, 102, 204);">01</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.veryposi.info/programing/php/phpdocumentor-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHPのドキュメント作成にPhpDocumentorを使ってみる</title>
		<link>http://blog.veryposi.info/programing/php/phpdocumentor/</link>
		<comments>http://blog.veryposi.info/programing/php/phpdocumentor/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 00:31:29 +0000</pubDate>
		<dc:creator>gensan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpdocumentor]]></category>

		<guid isPermaLink="false">http://blog.veryposi.info/?p=708</guid>
		<description><![CDATA[PHPを使ってプログラムを書いていてJavadocのようなドキュメントを作成できたらいいなぁと思ってPhpDocumentorを使ってみました。 まずは、WindowsにXAMPPをインストールした環境でのPhpDocu [...]]]></description>
			<content:encoded><![CDATA[<p>PHPを使ってプログラムを書いていてJavadocのようなドキュメントを作成できたらいいなぁ<img src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/up.gif" alt="" />と思って<a href="http://www.phpdoc.org/">PhpDocumentor</a>を使ってみました。</p>
<p>まずは、WindowsにXAMPPをインストールした環境でのPhpDocumentorのセットアップの方法です。</p>
<h3>PhpDocumentorのセットアップ</h3>
<ol>
<li>&nbsp;XAMPPのPHPインストール先のフォルダにPATHを設定します。<br />
    （XAMPPのセットアップについては<a href="http://blog.veryposi.info/programing/php/php-guide-2/">こちら</a>をご覧ください）<br />
    ◆PATHの設定方法◆<br />
    ■&nbsp;     Windows2000、XPでの設定方法<br />
    「コントロールパネル」から「システム」を開きます。<br />
    すると、「システムのプロパティ」ウインドウが開くので「詳細」タブを選択し「環境変数」ボタンを押下します。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_01.jpg" rel="lightbox[708]"><img height="243" width="300" class="aligncenter size-medium wp-image-715" title="システムのプロパティ" alt="システムのプロパティ" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_01-300x243.jpg" /></a><br />
    環境変数の設定ウインドウが開きます。<br />
    「システム環境変数」の中に「PATH」という変数があるので選択し、編集ボタンを押下します。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_02.jpg" rel="lightbox[708]"><img height="264" width="300" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_02-300x264.jpg" alt="環境変数ウインドウ" title="環境変数ウインドウ" class="aligncenter size-medium wp-image-722" /></a><br />
    「PATH」の編集画面が表示されるので、「C:\xampp\php;」を追加します。<br />
    追加したら「OK」ボタンを押下します。<br />
    <span style="color: rgb(255, 0, 0);">※「;」がPATHの区切り文字になっているので前のパスとの間に「;」があることを確認してください。</span><br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_03.jpg" rel="lightbox[708]"><img height="95" width="300" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_03-300x95.jpg" alt="PATHの設定" title="PATHの設定" class="aligncenter size-medium wp-image-723" /></a></p>
<p>    &nbsp;■     WindowsVistaでの設定方法<br />
    &nbsp;     「コントロールパネル」から「システムとメンテナンス」を開きます。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_01.jpg" rel="lightbox[708]"><img height="223" width="300" class="aligncenter size-medium wp-image-727" title="システムとメンテナンスを選択" alt="システムとメンテナンスを選択" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_01-300x223.jpg" /></a><br />
    すると、「システムとメンテナンス」ウインドウが開くので「システム」を開きます。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_02.jpg" rel="lightbox[708]"><img height="225" width="300" class="aligncenter size-medium wp-image-728" title="システムとメンテナンス" alt="システムとメンテナンス" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_02-300x225.jpg" /></a><br />
    すると「システム」ウインドウが開くので、「システムの詳細設定」をクリックします。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_03.jpg" rel="lightbox[708]"><img height="225" width="300" class="aligncenter size-medium wp-image-730" title="システムの詳細設定" alt="システムの詳細設定" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_03-300x225.jpg" /></a><br />
    「システムのプロパティ」が開くので「詳細設定」のタブにある「環境変数」ボタンを押下します。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_04.jpg" rel="lightbox[708]"><img height="270" width="300" class="aligncenter size-medium wp-image-729" title="システムのプロパティ" alt="システムのプロパティ" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_04-300x270.jpg" /></a><br />
    環境変数の設定ウインドウが開きます。<br />
    「システム環境変数」の中に「PATH」という変数があるので選択し、編集ボタンを押下します。<br />
    <a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_05.jpg" rel="lightbox[708]"><img height="265" width="300" class="aligncenter size-medium wp-image-731" title="環境変数の設定" alt="環境変数の設定" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_05-300x265.jpg" /></a><br />
    「PATH」の編集画面が表示されるので、「C:\xampp\php;」を追加します。<br />
    追加したら「OK」ボタンを押下します。<br />
    <span style="color: rgb(255, 0, 0);">※「;」がPATHの区切り文字になっているので前のパスとの間に「;」があることを確認してください。<br />
    </span><a href="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_06.jpg" rel="lightbox[708]"><img height="104" width="300" class="aligncenter size-medium wp-image-732" title="Pathの設定" alt="Pathの設定" src="http://blog.veryposi.info/wp-content/uploads/2009/02/phpdocumentor_vista_06-300x104.jpg" /></a></li>
<li>コマンドプロンプトを開いて、一度PhpDcumentorをアンインストール為に以下のコマンドを実行します。<br />
    （XAMPPでインストールしていると既にインストールされていると思いますが一度アンインストールしください）</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="dos">
pear uninstall phpdocumentor</pre>
</td>
</tr>
</tbody>
</table></div>
</li>
<li>&nbsp;PhpDocumentorをインストールします。<br />
    コマンドプロンプトで以下のコマンドを実行します。</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="dos">
pear install -a phpdocumentor</pre>
</td>
</tr>
</tbody>
</table></div>
<p>    これで、PhpDocumentorのインストールが終了しました。</li>
</ol>
<h3>PhpDocumentorを使ってみよう</h3>
<p>&nbsp;コマンドを実行して、ドキュメントを作ってみましょう</p>
<p>例）</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="php">
phpdoc -t ./phpdoc/ -d C:/htdocs/codeigniter/<a href="http://www.php.net/system"><span style="color: rgb(0, 0, 102);">system</span></a>/application/</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>-tオプションで出力先を決定、-dオプションでphpdocを処理するソースが存在するディレクトリを指定しています。</p>
<p>詳しいコマンドのオプション内容は、<a href="http://manual.phpdoc.org/HTMLSmartyConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.windows">こちら</a>をご覧ください。PDFファイルなどにも出力できますよ<img alt="" src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/happy01.gif" /></p>
<p>&nbsp;ちょっとだけコマンド解説</p>
<ul>
<li>-tオプション：作成されたファイルの出力先（相対パス、絶対パスどちらで指定することも可能です）</li>
<li>-dオプション：ドキュメントを作成するファイルが入っているディレクトリを指定する（相対パス、絶対パスどちらで指定することも可能です）</li>
<li>-fオプション：ドキュメントを作成するファイルを指定する（相対パス、絶対パスどちらで指定することも可能です）</li>
<li>-oオプション：ドキュメントのレイアウトを指定する<br />
    PDFや、色々なHTMLのレイアウトが指定できます。<br />
    例）PDFでの出力</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="php">
phpdoc -t ./phpdoc -d ./application -o PDF:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span>:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span></pre>
</td>
</tr>
</tbody>
</table></div>
<p>    例）デフォルトとは違うレイアウトでの出力（日本語も文字化けしないのでこれはお勧めの設定）</p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
</pre>
</td>
<td class="code">
<pre class="php">
phpdoc -t ./phpdoc -d ./application -o HTML:Smarty:PHP</pre>
</td>
</tr>
</tbody>
</table></div>
<p>    他にも先ほど<a href="http://manual.phpdoc.org/HTMLSmartyConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#using.command-line.windows">phpdocのコマンドのリファレンス</a>の-oオプションの場所に色々なoutputの出力できる定義がのっているので試してみてください。<br />
    （中には文字コードが指定されている為に、日本語が文字化けするものも存在するので注意が必要です）</li>
</ul>
<h4>出力種類の一覧） -oオプションで使用できる値は以下のものになります</h4>
<p>ドキュメントが英語で書かれているので面倒なので-oオプションで使用できる値の一覧を抜粋して書いておきました<img alt="" src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/happy01.gif" /><img alt="" src="http://blog.veryposi.info/wp-content/plugins/fckeditor-for-wordpress-plugin/smiles/typepad/scissors.gif" /></p>
<div class="syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre>
</td>
<td class="code">
<pre class="php">
HTML:frames:* - output is HTML with frames.
      HTML:frames:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span> - JavaDoc-like template, very plain, minimal formatting
      HTML:frames:earthli - BEAUTIFUL template written by Marco von Ballmoos
      HTML:frames:l0l33t - Stylish template
      HTML:frames:phpdoc.de - Similar to phpdoc.de PHPDoc output
      HTML:frames:phphtmllib - Very nice user-contributed template
      HTML:frames:phpedit - Based on output from PHPEdit Help Generator
&nbsp;
HTML:Smarty:* - output is HTML with no frames.
      HTML:Smarty:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span> - Bold template design using css to control layout
      HTML:Smarty:HandS - Layout is based on PHP, but more refined, with logo image
      HTML:Smarty:PHP - Layout is identical to the PHP website
&nbsp;
CHM:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span>:* - output is CHM, compiled help <a href="http://www.php.net/file"><span style="color: rgb(0, 0, 102);">file</span></a> format <span style="color: rgb(102, 204, 102);">(</span>Windows help<span style="color: rgb(102, 204, 102);">)</span>.
      CHM:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span>:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span> - Windows help <a href="http://www.php.net/file"><span style="color: rgb(0, 0, 102);">file</span></a>, based on HTML:frames:l0l33t
&nbsp;
PDF:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span>:* - output is PDF, Adobe Acrobat format
      PDF:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span>:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span> - standard, plain PDF formatting
&nbsp;
XML:DocBook:* - output is XML, in DocBook format
      XML:DocBook/peardoc2:<span style="color: rgb(0, 0, 0); font-weight: bold;">default</span> - documentation ready <span style="color: rgb(177, 177, 0);">for</span> compiling into peardoc <span style="color: rgb(177, 177, 0);">for</span> online pear.php.net documentation, 2nd revision</pre>
</td>
</tr>
</tbody>
</table>
</div>
<h3>PhpDocument用のコメントの書き方</h3>
<p>コメントの書き方は、<a href="http://blog.veryposi.info/programing/php/phpdocumentor-2/">こちら</a>を見てください。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.veryposi.info/programing/php/phpdocumentor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: blog.veryposi.info @ 2026-04-28 04:53:33 -->