Solved

php documentation

Posted on 2016-11-14
4
49 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 110

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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