SlideShare a Scribd company logo
The Big Documentation Extravaganza Stephan Schmidt <schst@php.net> 1&1 Internet AG
Agenda Why documentation is needed Types of documentation phpDocumentor DoxyGen DocBook / peardoc ReST
The Speaker PHP since 1999 Working for 1&1 Internet AG Founder of PHP Application Tools (www.php-tools.net) Member of PEAR QA Core Team and active PEAR developer Regular contributor to various magazines Speaker at conferences around the globe
Why write documentation? You are not alone Working in teams Communication is important Your brain leaks Do you remember what code you wrote four weeks ago actually does? If yes, what about two years ago? You could be hit by a bus!
More reasons for documentation Helps you design new parts of your code Write and document function prototypes &quot;PHP is as easy to read as English.&quot; Documentation is at a higher level There are people that don't &quot;talk&quot; PHP
Types of documentation Comments Documentation in the source code API-documentation May be generated from code (comments) description of functions, classes, methods,… Tutorials Helps you get started What? Why? How?
Documentation must be useful Bad: // increment $i by one $i++; Good: // create a unique cache key for the current request $key = md5(serialize($this->_cacheData)); Comment must add value to your code, otherwise they are wasted bytes.
Creating API documentation Document your code using DocBlocks Special comments that start with /** Classes, functions, variables, constants Contains a summary for these elements Purpose Function arguments / return value Visibility (in PHP4) Links for further reading
A typical DocBlock /** * Multiply two integer values * * @access public * @param  int  value 1 * @param  int  value 2 * @return int  product of the *  two values */ function  multiply ($a ,  $b ) {}
History of DocBlocks in PHP Borrowed from JavaDoc phpDoc by Ulf Wendel First public appearance on the PHP Kongress 2000 in Cologne Only one release (1.0beta) deprecated, not in CVS anymore ported to PEAR in 2002 Makes use of the tokenizer extension Also only one release
phpDocumentor De-facto standard for DocBlocks in PHP Mainly developed by Joshua Eichhorn and Greg Beaver Tons of features Creates HTML, PDF, CHM and DocBook Source code highlighting Creates tutorials, to-do lists, … Includes README, CHANGELOG, etc.
phpDocumentor Tags Common tags @var, @param, @return @static, @abstract, @access (in PHP4) @see, @uses, @link @category, @package, @subpackage @author, @copyright, @version Supports inline tags Supports DocBlock templates
phpDocumentor Easy to install using the PEAR installer Command-line interface Use command line options Create configuration files for common tasks Easy-to-Use web interface Creates more than one output format at once $ pear install phpDocumentor
Using the CLI Interface Specify options in command line (total of 23 options), three are needed Source file(s)/dirs Output format Target directory phpdoc   -d /home/schst/pear/pear/XML_Serializer/   -o HTML:frames:earthli   -t ./XML_Serializer_Docs
Web interface
Advanced Features Ability to include README files Ability to create tutorials that contain more information than just API documentation Based on SGML Syntax Possible for packages, classes and functions Include Links to source code of Examples
HTML Output
PDF Output
DoxyGen Documentation System for C++, C, Java, Objective-C, IDL   But also works for PHP Extracts DocBlocks but also creates documentation from undocumented source files Creates HTML, LaTeX, RTF, PDF, CHM, XML and Unix man pages
DoxyGen Features Supports documentation of files, namespaces, classes, variables, functions and defines (plus a lot entities not available in PHP). Creates class diagrams from your code as EPS or PNG with image maps Includes references to source code and examples
DoxyGen Features (cont.) some kind of Wiki markup inside DocBlocks HTML tags in documentation are allowed allows you to mark visibility for methods and properties more than 150 configuration options reads from configuration files Provides a wizard
DoxyWizard
DoxyGen HTML Output
DoxyGen RTF Output
Graphical class hierarchies
Who uses DoxyGen Mozilla Xerxes KDevelop phpOpentracker http://www.phpopentracker.de/apidoc/ SPL http://www.php.net/~helly/php/ext/spl/
phpDocumentor vs. DoxyGen phpDocumentor easy to use made for PHP written in PHP several layouts created peardoc files DoxyGen Windows GUI not limited to PHP RTF output creates class diagrams
DocBook Set of SGML tags for describing articles, books and other prose documents Designed for writing documentation Created 1991 by HaL Computer Systems and O'Reilly Now managed by OASIS Making heavy use of external entities extremely complex
DocBook elements Sets Books Divisions Components (chapters) Sections Meta information Block level elements (lists, paragraphs,…) Inline elements (Emphasis, Quote, etc.)
DocBook sample document <!DOCTYPE article PUBLIC &quot;-//OASIS//DTD DocBook V3.1//EN&quot; [ <!ENTITY sect2 SYSTEM &quot;section2.sgm&quot;> ]> <article> <artheader> <title>My Article</title> <author> <honorific>Dr</honorific><firstname>Ed</firstname> <surname>Wood</surname> </author> </artheader> <para> ... </para> <sect1> <title>On the Possibility of Going Home</title> <para> ... </para> </sect1> &sect2; <bibliography> ... </bibliography> </article>
Publishing DocBook Make use of stylesheets FOSIs DSSSL CSS XSL You'll probably use DSSSL (as php.net uses it)
peardoc PEAR uses DocBook (like the PHP documentation does) configure file will create external entities from file system: &package.xml.xml-util.intro;  refers to /package/xml/xml-util/intro.xml all <refsection/> tags have id attributes: &package.xml.xml-util.intro.example;  creates a URL with a fragment #example
Contributing documentation $ cvs -d :pserver:cvsread:phpfi@cvs.php.net:/repository login $ cvs -d :pserver:cvsread:phpfi@cvs.php.net:/repository checkout peardoc $ cd peardoc $ autoconf $ ./configure [--with-lang=en] $ make Requires openjade and DSSSL stylesheets The rest is done by configure/make
Directory structure en/ package/  (chapter) xml.xml  (category overview) xml/  (category files) xml-util.xml   (package overview) xml-wddx.xml  (package overview) xml-util/  (package files) intro.xml  (intro to package) example.xml  (example for package) xml-util/  (class) createtag.xml  (method of class) isvalidname.xml  (method of class) xml-wddx/  (package files)
Contributing documentation Create directory for the new package (replace _ with -) Create overview file in category directory: <sect1 id=&quot;package.xml.xml-util&quot;> <title>XML_Util</title> <para> Collection of often needed methods that help you creating XML documents. </para> &package.xml.xml-util.intro; &package.xml.xml-util.example; </sect1>
Contributing documentation Add directories for classes in your package Write DocBook files (or let phpDocumentor do this for you) Add the new package to the overview page Rebuild the documentation commit
reStructuredText Easy-to-read plain-text markup, like Wiki Has been built to create Python documentation Great to write short documentation DocUtils convert it to HTML LaTeX (PDF) XML
Using DocUtils Python with XML-support is needed (xml.dom.minidom) Get DocUtils from http://docutils.sourceforge.net Install using python setup.py install Write your documents Transform it to HTML/LaTeX/XML
An example document ================= My reST document ================= :Author:  Stephan Schmidt :Contact:  [email_address] .. contents:: Contents .. section-numbering:: Writing reST is easy ==================== The reST syntax is easy to learn and documents look good in the source. Creating lists is also very simple: - One - Two - Three :: require_once 'XML/Util.php'; echo XML_Util::createTag('Foo');
Publishing reST DocUtils package provides Python scripts: rst2html.py rst2latex.py rst2xml.py rst2pseudoxml.py Usage: $ rst2html sourcefile targetfile
Publishing reST
Other Tools Wikis Allow you to easy write structured documents xp Framework Uses its own parser to parse DocComments phpXRef Perl scripts to extract API documentation
Further reading and downloads phpDocumentor http://www.phpdoc.org DoxyGen http://www.doxygen.org DocBook http://www.docbook reST http://docutils.sourceforge.net/
The End Thanks for your attention. [email_address] http://www.php-tools.net

More Related Content

PPT
XML Transformations With PHP
PPT
PEAR For The Masses
PPT
Inroduction to XSLT with PHP4
PPT
Component and Event-Driven Architectures in PHP
PPT
XML and Web Services with PHP5 and PEAR
PPT
Go OO! - Real-life Design Patterns in PHP 5
PPT
Session Server - Maintaing State between several Servers
PPT
XML and PHP 5
XML Transformations With PHP
PEAR For The Masses
Inroduction to XSLT with PHP4
Component and Event-Driven Architectures in PHP
XML and Web Services with PHP5 and PEAR
Go OO! - Real-life Design Patterns in PHP 5
Session Server - Maintaing State between several Servers
XML and PHP 5

What's hot (20)

PDF
lf-2003_01-0269
PPT
PHP MySQL Workshop - facehook
PPT
Control Structures In Php 2
PPSX
Php and MySQL
PPT
Open Source Package Php Mysql 1228203701094763 9
PPT
PDF Localization
PPT
PDF
Web Development Course: PHP lecture 1
PPT
Php Crash Course
PPT
Overview of PHP and MYSQL
ODP
PHP Web Programming
PPT
AdvancedXPath
PPTX
Php Unit 1
DOCX
PHP NOTES FOR BEGGINERS
PPT
Php mysql
PPT
PHP POWERPOINT SLIDES
PPTX
Ot performance webinar
PPT
ImplementingChangeTrackingAndFlagging
PDF
New Features in PHP 5.3
PPT
Debugging and Error handling
lf-2003_01-0269
PHP MySQL Workshop - facehook
Control Structures In Php 2
Php and MySQL
Open Source Package Php Mysql 1228203701094763 9
PDF Localization
Web Development Course: PHP lecture 1
Php Crash Course
Overview of PHP and MYSQL
PHP Web Programming
AdvancedXPath
Php Unit 1
PHP NOTES FOR BEGGINERS
Php mysql
PHP POWERPOINT SLIDES
Ot performance webinar
ImplementingChangeTrackingAndFlagging
New Features in PHP 5.3
Debugging and Error handling
Ad

Viewers also liked (20)

PDF
Doxygen
PPT
Vs2013 doxygen 매크로 개발
PDF
Data localization and translation
PDF
"Internationalisation with PHP and Intl" source code
PPTX
Number series
PPT
Php Docs
PPTX
Number Series: How To Solve Questions with Short Tricks
PPTX
Multi language for php with gettext
ODP
Handling multibyte CSV files in PHP
PDF
Problem Solving with Algorithms and Data Structures
PDF
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
PDF
People code events flowchart
ODP
Internationalisation with PHP and Intl
PPTX
Logical reasoning number series
PDF
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
PPT
Cmp104 lec 7 algorithm and flowcharts
PPTX
Data Structure & Algorithms | Computer Science
PPTX
Basics of computer science
PPTX
Computer Science & Information Systems
Doxygen
Vs2013 doxygen 매크로 개발
Data localization and translation
"Internationalisation with PHP and Intl" source code
Number series
Php Docs
Number Series: How To Solve Questions with Short Tricks
Multi language for php with gettext
Handling multibyte CSV files in PHP
Problem Solving with Algorithms and Data Structures
Grand Rapids PHP Meetup: Behavioral Driven Development with Behat
People code events flowchart
Internationalisation with PHP and Intl
Logical reasoning number series
Computer Science Engineering : Data structure & algorithm, THE GATE ACADEMY
Cmp104 lec 7 algorithm and flowcharts
Data Structure & Algorithms | Computer Science
Basics of computer science
Computer Science & Information Systems
Ad

Similar to The Big Documentation Extravaganza (20)

PPT
PHP Documentor
PDF
The Beauty and the Beast
PDF
The Beauty And The Beast Php N W09
PDF
The beautyandthebeast phpbat2010
PPT
Automating API Documentation
PPT
DOM and SAX
PDF
DocBlox: your source matters @ #pfc11
KEY
20090629 Using phpDocumentor
PDF
Inside DocBlox
PPT
Documentation With Open Source Tools·(ასლი)
PPT
Documentation With Open Source Tools
PDF
Why documentation osidays
PPT
Introduction to XML
ODP
What's new, what's hot in PHP 5.3
PDF
Php Documentor The Beauty And The Beast
PPTX
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
PDF
RoundTrip_references
PDF
RoundTrip_references
PPT
Ch2 neworder
PPT
Web Services Part 1
PHP Documentor
The Beauty and the Beast
The Beauty And The Beast Php N W09
The beautyandthebeast phpbat2010
Automating API Documentation
DOM and SAX
DocBlox: your source matters @ #pfc11
20090629 Using phpDocumentor
Inside DocBlox
Documentation With Open Source Tools·(ასლი)
Documentation With Open Source Tools
Why documentation osidays
Introduction to XML
What's new, what's hot in PHP 5.3
Php Documentor The Beauty And The Beast
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
RoundTrip_references
RoundTrip_references
Ch2 neworder
Web Services Part 1

More from Stephan Schmidt (17)

PDF
Das Web Wird Mobil - Geolocation und Location Based Services
PDF
23 Dinge, die Sie über Software Entwicklung in Teams wissen sollten
PDF
23 Dinge, die Sie über Software-Entwicklung in Teams wissen sollten
PDF
Continuous Integration mit Jenkins
PDF
Die Kunst des Software Design - Java
PDF
PHP mit Paul Bocuse
PDF
Der Erfolgreiche Programmierer
PDF
23 Dinge, die Sie über Software-Entwicklung in Teams wissen sollten.
KEY
Die Kunst Des Software Design
PDF
Software-Entwicklung Im Team
PDF
JSON-RPC Proxy Generation with PHP 5
PPT
Declarative Development Using Annotations In PHP
PPT
XML-Socket-Server zur Kommunikation mit Flash
PPT
Interprozesskommunikation mit PHP
PPT
PHP im High End
PPT
Dynamische Websites mit XML
PPT
Web 2.0 Mit Der Yahoo User Interface Library
Das Web Wird Mobil - Geolocation und Location Based Services
23 Dinge, die Sie über Software Entwicklung in Teams wissen sollten
23 Dinge, die Sie über Software-Entwicklung in Teams wissen sollten
Continuous Integration mit Jenkins
Die Kunst des Software Design - Java
PHP mit Paul Bocuse
Der Erfolgreiche Programmierer
23 Dinge, die Sie über Software-Entwicklung in Teams wissen sollten.
Die Kunst Des Software Design
Software-Entwicklung Im Team
JSON-RPC Proxy Generation with PHP 5
Declarative Development Using Annotations In PHP
XML-Socket-Server zur Kommunikation mit Flash
Interprozesskommunikation mit PHP
PHP im High End
Dynamische Websites mit XML
Web 2.0 Mit Der Yahoo User Interface Library

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Mobile App Security Testing_ A Comprehensive Guide.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
sap open course for s4hana steps from ECC to s4
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

The Big Documentation Extravaganza

  • 1. The Big Documentation Extravaganza Stephan Schmidt <schst@php.net> 1&1 Internet AG
  • 2. Agenda Why documentation is needed Types of documentation phpDocumentor DoxyGen DocBook / peardoc ReST
  • 3. The Speaker PHP since 1999 Working for 1&1 Internet AG Founder of PHP Application Tools (www.php-tools.net) Member of PEAR QA Core Team and active PEAR developer Regular contributor to various magazines Speaker at conferences around the globe
  • 4. Why write documentation? You are not alone Working in teams Communication is important Your brain leaks Do you remember what code you wrote four weeks ago actually does? If yes, what about two years ago? You could be hit by a bus!
  • 5. More reasons for documentation Helps you design new parts of your code Write and document function prototypes &quot;PHP is as easy to read as English.&quot; Documentation is at a higher level There are people that don't &quot;talk&quot; PHP
  • 6. Types of documentation Comments Documentation in the source code API-documentation May be generated from code (comments) description of functions, classes, methods,… Tutorials Helps you get started What? Why? How?
  • 7. Documentation must be useful Bad: // increment $i by one $i++; Good: // create a unique cache key for the current request $key = md5(serialize($this->_cacheData)); Comment must add value to your code, otherwise they are wasted bytes.
  • 8. Creating API documentation Document your code using DocBlocks Special comments that start with /** Classes, functions, variables, constants Contains a summary for these elements Purpose Function arguments / return value Visibility (in PHP4) Links for further reading
  • 9. A typical DocBlock /** * Multiply two integer values * * @access public * @param int value 1 * @param int value 2 * @return int product of the * two values */ function multiply ($a , $b ) {}
  • 10. History of DocBlocks in PHP Borrowed from JavaDoc phpDoc by Ulf Wendel First public appearance on the PHP Kongress 2000 in Cologne Only one release (1.0beta) deprecated, not in CVS anymore ported to PEAR in 2002 Makes use of the tokenizer extension Also only one release
  • 11. phpDocumentor De-facto standard for DocBlocks in PHP Mainly developed by Joshua Eichhorn and Greg Beaver Tons of features Creates HTML, PDF, CHM and DocBook Source code highlighting Creates tutorials, to-do lists, … Includes README, CHANGELOG, etc.
  • 12. phpDocumentor Tags Common tags @var, @param, @return @static, @abstract, @access (in PHP4) @see, @uses, @link @category, @package, @subpackage @author, @copyright, @version Supports inline tags Supports DocBlock templates
  • 13. phpDocumentor Easy to install using the PEAR installer Command-line interface Use command line options Create configuration files for common tasks Easy-to-Use web interface Creates more than one output format at once $ pear install phpDocumentor
  • 14. Using the CLI Interface Specify options in command line (total of 23 options), three are needed Source file(s)/dirs Output format Target directory phpdoc -d /home/schst/pear/pear/XML_Serializer/ -o HTML:frames:earthli -t ./XML_Serializer_Docs
  • 16. Advanced Features Ability to include README files Ability to create tutorials that contain more information than just API documentation Based on SGML Syntax Possible for packages, classes and functions Include Links to source code of Examples
  • 19. DoxyGen Documentation System for C++, C, Java, Objective-C, IDL But also works for PHP Extracts DocBlocks but also creates documentation from undocumented source files Creates HTML, LaTeX, RTF, PDF, CHM, XML and Unix man pages
  • 20. DoxyGen Features Supports documentation of files, namespaces, classes, variables, functions and defines (plus a lot entities not available in PHP). Creates class diagrams from your code as EPS or PNG with image maps Includes references to source code and examples
  • 21. DoxyGen Features (cont.) some kind of Wiki markup inside DocBlocks HTML tags in documentation are allowed allows you to mark visibility for methods and properties more than 150 configuration options reads from configuration files Provides a wizard
  • 26. Who uses DoxyGen Mozilla Xerxes KDevelop phpOpentracker http://www.phpopentracker.de/apidoc/ SPL http://www.php.net/~helly/php/ext/spl/
  • 27. phpDocumentor vs. DoxyGen phpDocumentor easy to use made for PHP written in PHP several layouts created peardoc files DoxyGen Windows GUI not limited to PHP RTF output creates class diagrams
  • 28. DocBook Set of SGML tags for describing articles, books and other prose documents Designed for writing documentation Created 1991 by HaL Computer Systems and O'Reilly Now managed by OASIS Making heavy use of external entities extremely complex
  • 29. DocBook elements Sets Books Divisions Components (chapters) Sections Meta information Block level elements (lists, paragraphs,…) Inline elements (Emphasis, Quote, etc.)
  • 30. DocBook sample document <!DOCTYPE article PUBLIC &quot;-//OASIS//DTD DocBook V3.1//EN&quot; [ <!ENTITY sect2 SYSTEM &quot;section2.sgm&quot;> ]> <article> <artheader> <title>My Article</title> <author> <honorific>Dr</honorific><firstname>Ed</firstname> <surname>Wood</surname> </author> </artheader> <para> ... </para> <sect1> <title>On the Possibility of Going Home</title> <para> ... </para> </sect1> &sect2; <bibliography> ... </bibliography> </article>
  • 31. Publishing DocBook Make use of stylesheets FOSIs DSSSL CSS XSL You'll probably use DSSSL (as php.net uses it)
  • 32. peardoc PEAR uses DocBook (like the PHP documentation does) configure file will create external entities from file system: &package.xml.xml-util.intro; refers to /package/xml/xml-util/intro.xml all <refsection/> tags have id attributes: &package.xml.xml-util.intro.example; creates a URL with a fragment #example
  • 33. Contributing documentation $ cvs -d :pserver:cvsread:phpfi@cvs.php.net:/repository login $ cvs -d :pserver:cvsread:phpfi@cvs.php.net:/repository checkout peardoc $ cd peardoc $ autoconf $ ./configure [--with-lang=en] $ make Requires openjade and DSSSL stylesheets The rest is done by configure/make
  • 34. Directory structure en/ package/ (chapter) xml.xml (category overview) xml/ (category files) xml-util.xml (package overview) xml-wddx.xml (package overview) xml-util/ (package files) intro.xml (intro to package) example.xml (example for package) xml-util/ (class) createtag.xml (method of class) isvalidname.xml (method of class) xml-wddx/ (package files)
  • 35. Contributing documentation Create directory for the new package (replace _ with -) Create overview file in category directory: <sect1 id=&quot;package.xml.xml-util&quot;> <title>XML_Util</title> <para> Collection of often needed methods that help you creating XML documents. </para> &package.xml.xml-util.intro; &package.xml.xml-util.example; </sect1>
  • 36. Contributing documentation Add directories for classes in your package Write DocBook files (or let phpDocumentor do this for you) Add the new package to the overview page Rebuild the documentation commit
  • 37. reStructuredText Easy-to-read plain-text markup, like Wiki Has been built to create Python documentation Great to write short documentation DocUtils convert it to HTML LaTeX (PDF) XML
  • 38. Using DocUtils Python with XML-support is needed (xml.dom.minidom) Get DocUtils from http://docutils.sourceforge.net Install using python setup.py install Write your documents Transform it to HTML/LaTeX/XML
  • 39. An example document ================= My reST document ================= :Author: Stephan Schmidt :Contact: [email_address] .. contents:: Contents .. section-numbering:: Writing reST is easy ==================== The reST syntax is easy to learn and documents look good in the source. Creating lists is also very simple: - One - Two - Three :: require_once 'XML/Util.php'; echo XML_Util::createTag('Foo');
  • 40. Publishing reST DocUtils package provides Python scripts: rst2html.py rst2latex.py rst2xml.py rst2pseudoxml.py Usage: $ rst2html sourcefile targetfile
  • 42. Other Tools Wikis Allow you to easy write structured documents xp Framework Uses its own parser to parse DocComments phpXRef Perl scripts to extract API documentation
  • 43. Further reading and downloads phpDocumentor http://www.phpdoc.org DoxyGen http://www.doxygen.org DocBook http://www.docbook reST http://docutils.sourceforge.net/
  • 44. The End Thanks for your attention. [email_address] http://www.php-tools.net