Solved

php documentation

Posted on 2016-11-14
4
32 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 108

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 26

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

867 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now