Re: cvs: pear /Event_Dispatcher Dispatcher.php Notification.php package.xml /Event_Dispatcher/examples bubbling.php cancel.php notification-class.php
object.php /Event_Dispatcher/tests Console_TestListener.php Dispatcher_testcase.php test.php
| From: | Daniel Convissor | Date: | Sat, 05 Feb 2005 14:26:27 +0000 |
| Subject: | Re: cvs: pear /Event_Dispatcher Dispatcher.php Notification.php package.xml /Event_Dispatcher/examples bubbling.php cancel.php notification-class.php object.php /Event_Dispatcher/tests Console_TestListener.php Dispatcher_testcase.php test.php |
||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-29148@lists.php.net to get a copy of this message | ||
Hi Bertrand:
On Sat, Feb 05, 2005 at 01:10:38PM -0000, Bertrand Mansion wrote:
> <?php
> // +-----------------------------------------------------------------------+
> // | Copyright (c) 2005, Bertrand Mansion |
> // | All rights reserved. |
How about getting ahead of the curve by using the new page level docblocks
from the header comment block proposal in PEPr?
> /**
> * 'static property' for Notification object
> */
> $GLOBALS['_Event_Dispatcher'] = array(
In order for phpDocumentor to pick up the docblock, it needs to look
like this:
/**
* 'static property' for Notification object
* @global array $GLOBALS['_Event_Dispatcher']
*/
> * in {@link Event_Notification} objects. Client objects register
Here, and throughout the file, @link is misused. It's only for URI's.
@see is used for referencing interal members and the @see tag must be on
it's own, not inline.
> * @author Bertrand Mansion <bmansion@mamasam.com>
> * @author Stephan Schmidt <schst@php.net>
> * @copyright 2005
> * @license
> http://www.opensource.org/licenses/bsd-license.php BSD License
> * @version @VER@
> * @package Event_Dispatcher
Please look at the header comment block RFC in PEPr. Copy the class-level
docblock, paste it into your code and then substitute the text appropriate
for your class.
> * @access public
> * @param string Expected notification name, serves as a filter
> * @param mixed A PHP callback
> * @param string Expected contained object class, serves as a filter
> * @return void
> */
> function addObserver($callback, $nName = EVENT_DISPATCHER_GLOBAL, $class = null)
Check out the sample file in the coding standards. The @param tags need
the parameter's name in them. The @access goes below the @return, which
needs to get added here. Please put line breaks between the @param,
@return and @access sections. Also, plesae wrap the lines (both docblocks
and code itself) when things approach 80 chars.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409