There is no “real standard” about what to comment on and how, but some tags are used by almost everyone who comments on its code.
For example, I usually use at least:
- brief descriptions
- ,
@param type name description: /@returns type: /@throws ExceptionType: /@see ...: URL,- ,
@package @subpackage - , ( IDE, )
@property type $name: Eclipse PDT , - Doctrine , .
Eclipse PDT, ( @param); , Eclipse PDT: , ; -)
, , / (Zend Framework, Doctrine,...), , - , -, .
, Zend Framework, :
class Zend_Cache_Backend_Apc extends Zend_Cache_Backend implements Zend_Cache_Backend_ExtendedInterface
:
/**
* Test if a cache is available for the given id and (if yes) return it (false else)
*
* WARNING $doNotTestCacheValidity=true is unsupported by the Apc backend
*
* @param string $id cache id
* @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested
* @return string cached datas (or false)
*/
public function load($id, $doNotTestCacheValidity = false)
, - : , .