phpDocumentor
pour générer automatiquement une documentation à partir de vos scripts php
phpDocumentor, sometimes referred to as phpdoc or phpdocu, is the current standard auto-documentation tool for the php language. Similar to Javadoc, and written in php, phpDocumentor can be used from the command line or a web interface to create professional documentation from php source code. phpDocumentor has support for linking between documentation, incorporating user level documents like tutorials and creation of highlighted source code with cross referencing to php general documentation. A complete list of features is available.
phpDocumentor uses an extensive templating system to change your source code comments into human readable, and hence useful, formats. This system allows the creation of easy to read documentation in 15 different pre-designed HTML versions, PDF format, Windows Helpfile CHM format, and in Docbook XML. You can also create your own templates to match the look and feel of your project.
Install tips
faut avoir pear, en cas de doute:
apt-get install php-pear php5-cli
puis suivre la procédure décrite dans l'INSTALL du téléchargement, soit
pear config-set data_dir /path/to/public_html/pear
(sur ubuntu j'ai fait un:)
radeff@radeff:/var/www$ mkdir pear radeff@radeff:/var/www$ pear config-set data_dir /var/www/pear config-set succeeded
passer en root:
sudo su pear channel-update pear.php.net #du le faire chez moi mais pas indispensable pear upgrade XML_Beautifier pear upgrade PhpDocumentor
et normalement après vous avez accès en ligne de commande à:
phpdoc
exemple avec une doc joomla:
radeff@radeff:~/joomla/soft/Joomla_1.5.9-Stable-Full_Package-French.v1$ phpdoc -f *.php -d ./components/com_user/ -t ~/test
ou plus joli
phpdoc -o HTML:frames:earthli -f *.php -t docs
résultat nickel! attention à pas lancer trop large… (trop haut)
pas encore eu le temps de faire un test avec l'installateur web - pas forcément très utile dans un premier temps, à moins d'avoir du code généré sur un serveur sans accès ssh (ex. infomaniak), mais moi je préfère pour le code faire en local avec svn puis copier (synchro ftp) sur le serveur distant