Latest

Archive

Community news

C++

Communities and Content

Databases

Editorials

Emacs

General

HTML

Java

Notices

PHP

XML

Apache

C++

Database

General

HTML

Java

Javascript

Linux

Object oriented programming

Open source

Perl

PHP

Python

Ruby

SOAP

XML

Suggest a link

Advertise on zez

Contribute

Contact us

About zez


PHP class documentation



TODO

One nice feature with eZ phpdoc is the ability to store a todo list internally in the class documentation. All the todo items will be generated in an overview page where each todo item is linked to the class it belongs to. If you have an empty line you get a new todo item.


/*!TODO
  First thing to do.

  Second thing to do.

  Yet, another thing to do. This one spans over two lines
  and contains more information about what to do.
*/


C++ wannabe


Since PHP does not have the ability to set member functions to private or static, we have implemented the feature to set this as a special comment tag.

The example below shows how you can use the \static tag to define a
function as static in your documentation.


/*!
 \static
 This function is static. 
*/
function aStaticFunction()
{
}


Let's get some privacy


If you have functions in your class which does not belong in the public scope, i.e. another class should not call that function, you should make that function private. This does certainly not make the function private, but it gets marked in the documentation as private. It is up to other developers not to call that function from another class.


/*!
 \private
 This function is private.
*/
function aPrivateFunction()
{
}



<< Previous page | 1 | 2 | < 3 > | 4 | Next page >> | Printer-friendly page |

Comment List


Topic: Author:
Time:
subclasses Geoff Caplan 16.03.2001 22:18

Love the tool. I like the markup style, which is less intrusive than the javadoc style to my way of thinking.

The weakness, as I see it, compared to the main competition (www.phpdoc.de) is that ezphpdoc doesn't show the class hierarchy. If you get around to upgrading the script, perhaps you would consider adding this facility.


Good tool, need to discuss the specifics though David Grinberg 21.02.2001 00:51

I think that after using this tool for a little while that it is an extremely good and powerful little tool. One that I will be using for all of my PHP documentation now.

I also like the tutorial very easy to read and gets straight to the point. Although I would like to point out some problems that I had and tok me a while to figure out.

1. Cannot have an index class in a file called index.php. As the generator puts the class list in a file called index.html and puts the documentation for the index class into index.html (copies the name of the php file.) These two then overwrite one another.

2. Cannot have a space before the declaration of the class. class needs to be the first character on the line, otherwise the tool cannot find the name.

3. There is no description of how to insert the version in the tutorial. Just need to check out the source code in th example.

Overall I love it. Keep up the good work!!


phpdoc Ot Ratsaphong 28.11.2000 00:53

I am very impressed with this product. I especially like the ability to view the source code and the ability to switch back and forth b/w code and doco. Well Done!!!

One thing I found missing in the article were some recommendations on what information to put in the documentation. The examples show fairly rudimentary documentation.

We've got the tool to document our code, now let's see some examples of good documentation.

BTW your coding style is a great example to follow.


   RE: phpdoc examples Paul Kenneth Egell-Johnsen 28.11.2000 18:51

Check out http://doc.ez.no for our nightly updated php classes. These are documented using what we consider good style.

I will be the first, though, to admit that we haven't been very good at keeping it up, but rest assured, we will slowly get there.




Forgot your password?

Register a new user

Results

Polls