{"id":239,"date":"2010-07-27T13:15:31","date_gmt":"2010-07-27T11:15:31","guid":{"rendered":"http:\/\/www.speich.net\/articles\/?p=239"},"modified":"2018-02-24T16:36:09","modified_gmt":"2018-02-24T15:36:09","slug":"how-to-create-php-documentation-in-phpstorm","status":"publish","type":"post","link":"https:\/\/www.speich.net\/articles\/en\/2010\/07\/27\/how-to-create-php-documentation-in-phpstorm\/","title":{"rendered":"How to create PHP documentation in PhpStorm"},"content":{"rendered":"<p><a title=\"PhpStorm\" href=\"http:\/\/www.jetbrains.com\/phpstorm\/\">PhpStorm<\/a> displays your own code documentation in the code assist. But what if you wanted to create a separate documentation you can hand out or integrate into your website? Then you should use <a title=\"phpDocumentor website\" href=\"http:\/\/phpdoc.org\">phpDocumentor<\/a>. You can configure and run phpDocumentor directly from PhpStorm as an external tool. Here is what you have to do:<\/p>\n<p><!--more-->File -&gt; Settings -&gt; Select External Tools -&gt; Add&#8230;<\/p>\n<figure style=\"width: 720px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\" \" title=\"Installing phpDocumentor in phpStorm as an external tool\" src=\"\/articles\/images\/screenshot-run-external-tools1.gif\" alt=\"Installing phpDocumentor in phpStorm as an external tool\" width=\"720\" height=\"757\" \/><figcaption class=\"wp-caption-text\">Screenshot showing how to install phpDocumentor in phpStorm as an external tool.<\/figcaption><\/figure>\n<p>Provide the following data:<\/p>\n<p><strong>Name<\/strong>:\u00a0 phpDocumentor<br \/>\nThis name will show up in your Tools Menu. If you fill in a group such as PHP, then the entry will become a submenu of PHP.<\/p>\n<p><strong>Program<\/strong>: &lt;pathToPhp.exe&gt;<br \/>\nFill in the path to your PHP executable, e.g. C:Program FilesPHPphp.exe<\/p>\n<p><strong>Parameters<\/strong>: phpdoc -d &#8220;&lt;pathToSourceDirectory&gt;&#8221; -t &#8220;&lt;pathToDestinationDirectory&gt;&#8221; -o HTML:Smarty:PHP<br \/>\nThe source directory is the one you want to document, e.g. where your php files reside in. The destination directory is where you want the documentation to be created in. Please note, that paths are given without th a trailing slash and\u00a0 in case your paths contain spaces it is important to <strong>enclose the parameter in quotes<\/strong>.\u00a0 For more information about the parameters see the <a title=\"phpDocumentor tutorial\" href=\"http:\/\/manual.phpdoc.org\/HTMLSmartyConverter\/HandS\/phpDocumentor\/tutorial_tags.pkg.html\">phpDocumentor tutorial<\/a>.<\/p>\n<p><strong>Working Directory<\/strong>: &lt;pathToPhpDocumentor&gt;<br \/>\nFill in the path to your phpDocumentor directory, e.g. &#8220;C:\\Documents and Settings\\Speich\\My Documents\\Website Tools\\PhpDocumentor&#8221;<\/p>\n<p>In case you also wanted to create documentation for your JavaScript code, you should read the blog entry &#8216;<a href=\"\/articles\/?p=246\">How to create JavaScript documentation in PhpStorm<\/a>&#8216;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PhpStorm displays your own code documentation in the code assist. But what if you wanted to create a separate documentation you can hand out or integrate into your website? Then you should use phpDocumentor. You can configure and run phpDocumentor directly from PhpStorm as an external tool. Here is what you have to do:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[74,75,91],"class_list":["post-239","post","type-post","status-publish","format-standard","hentry","category-php","tag-phpdocumentor","tag-phpstorm","tag-tutorial","entry"],"_links":{"self":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/comments?post=239"}],"version-history":[{"count":1,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/239\/revisions"}],"predecessor-version":[{"id":1485,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/239\/revisions\/1485"}],"wp:attachment":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/media?parent=239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/categories?post=239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/tags?post=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}