PHPDoc comments

1 view
Skip to first unread message

Rick Gigger

unread,
Apr 2, 2008, 2:24:18 PM4/2/08
to zoop-...@googlegroups.com
Richard,

In the comments here for SqlQuery:
http://code.google.com/p/zoop/source/diff?r=219&format=side&path=/trunk/framework/db/functions.php

you explain the $params argument in the body of the text for that
function. Can't PHPDoc handle putting an explanation for a parameter
in with the name and type of the paramater?

Rick

Richard Bateman

unread,
Apr 2, 2008, 8:01:19 PM4/2/08
to zoop-...@googlegroups.com
You know, it seems to me that it should be possible as well, but I
haven't yet figured out how =] eclipse doesn't seem to support it.
I'll glance around a bit, if I can find a way I'll fix it.

Rick Gigger

unread,
Apr 2, 2008, 8:44:27 PM4/2/08
to zoop-...@googlegroups.com
Weird

Mark Suman

unread,
Apr 2, 2008, 10:05:43 PM4/2/08
to zoop-...@googlegroups.com
The way to document a function in PHPDoc is the following:

/**
 * Gets the Person object out of the database for the supplied id.
 * @param string $id Id of the requested Person
 * @return Person
 */

The signature for this function is  getPersonById($id)

Is that what you're looking to do?  You specify the type of var, the var name, then a short description all on the same line and PHPDoc parses it.

That's how I'm doing it in the project the site I'm building now and it works great.

Mark

Richard Bateman

unread,
Apr 3, 2008, 12:22:33 AM4/3/08
to zoop-...@googlegroups.com
Thanks, Mark... I actually finally found that on my own not long ago,
but I appreciate the info =]

So, Rick, I've fixed those comments.

Richard

Reply all
Reply to author
Forward
0 new messages