Created
March 1, 2013 17:04
-
-
Save billcreswell/5066109 to your computer and use it in GitHub Desktop.
Setting up Documentation for PHP Projects With Doxygen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Separate subdirectory called "doxygen" for docs | |
use a dir list script in index.php for projects: | |
.... | |
foreach($dirlist as $file) { | |
if ($file["type"] == "dir") { | |
} else { | |
if($file['name'] == "Index" && $file['type'] = "html") { | |
$fname = $file["name"]; | |
$fpath = $file["path"]; | |
$fdir = str_replace("./", "", $file["dir"]); | |
$list.="<li><b><a href='$fpath'>$fdir</a></b></li>"; | |
} | |
} | |
.... | |
Create a new doxyfile: | |
doxywizard /{doxygenhttpdir}/{myproject.com}.Doxyfile | |
Add project {myproject.com} | |
Source: /{myhttpdir}/{myproject.com} | |
Store in /{doxygenhttpdir}/{myproject.com} | |
Altered Doxygen Settings | |
FILE_PATTERNS = *.php *.inc *.js *.xhtml | |
RECURSIVE = YES | |
SOURCE_BROWSER = YES | |
GENERATE_TREEVIEW = YES | |
GENERATE_TODOLIST = YES | |
GENERATE_DEPRECATEDLIST= YES | |
SHOW_DIRECTORIES = YES | |
regen docs with "doxygen /{doxygenhttpdir}/{myproject.com}.Doxyfile" | |
To get a description for the project | |
I put this in the index.php | |
/** | |
*@mainpage | |
*Description of {myproject.com} | |
*/ | |
Class Description Sample | |
/** | |
* @class Zogi | |
* @brief A class for interacting with the OpenGroupware Server | |
* | |
* Zogi (originally OpenGroupwareServer) | |
* License LGPL http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
* copyright 2007, Whitemice Consulting | |
* package Melodic | |
* @author Adam Williams | |
*/ | |
Function Description Sample | |
/** | |
* @brief Get object data for one specific object from the server | |
* | |
* Extended description goes here. This link gets converted to a link http://code.google.com/p/zogi/wiki/getObjectById | |
* @param $_objectId int (objectId) | |
* @param $_detail int | |
* @param $_useCache bool | |
*/ | |
Display Function Sample | |
/** | |
* @brief Display part Information | |
* @param $category_assignment_id int | |
* @return html (Part.xhtml) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much for this explenation :-)