Solved

php documentation

Posted on 2016-11-14
4
43 Views
Last Modified: 2016-11-15
We are looking at some online solutions to be able to review and add documentation from our code. I looked at phpdoc and that looks nice but it looks to be a one way. We want to be able to add-on to the docs that might not be in code like a wiki. Is there a solution that will extract documentation from code and allow a user to add to the documentation?
0
Comment
Question by:Robert Saylor
  • 2
4 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 41886522
This is where WordPress is going on documentation.  At the moment, they are pretty much state-of-the-art.
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/
0
 

Author Comment

by:Robert Saylor
ID: 41886542
anything besides WP that would scan in custom code, display it's documentation and allow a user to add to the documentation?
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 41887446
i do not think such a tool exists.

i can suggest writing a wiki plugin that will parse your source code and grab the phpdoc from each function/class/lib/whatever and insert the doc inline whenever you use their names in your wiki.

i've successfully used a similar but simpler approach by using procedural code, reserving /** ... */ for documentation usage, and using a few rules :
- each function's doc is the first such block above it
- the first block of each library is the lib's desc except if there is a single func and block in the lib in which case both are the same
- some keywords such as "USAGE:" are handled and coloured ( i documented a bit like shell commands ), and other keywords are extracted from the capitalised word in the subject line
- i probably forgot part of it. was years ago.

then i have no idea about your precise needs.
personally, i stopped such integration because i believe a good inline doc is good enough, and i never moved to phpdoc on my own projects because i just hate the format... but i'm pretty sure most people will thell you to use phpdoc alone because it is the standard and because you can stick in a many comments and other information as you want once you know how to use it.
1
 

Author Closing Comment

by:Robert Saylor
ID: 41887854
I found out the same when google returned no results. We are going to use a Wiki software to maintain docs. It's mostly for company standard process.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question