阅读核心并查看几乎所有可用的帮助程序/插件等,我注意到有很多评论。
CakePHP 的结构使得确定事物在哪里以及它们在做什么非常简单。真的有必要评论所有这些代码吗?它会使源更混乱还是真的有用?当你摸索评论时,你觉得它们有用吗?或者你甚至读过它们?
更新:以下是从 CakePHP Core 连接管理器中获取的注释示例,例如:
/**
* Loads the DataSource class for the given connection name
*
* @param mixed $connName A string name of the connection, as defined in app/config/database.php,
* or an array containing the filename (without extension) and class name of the object,
* to be found in app/models/datasources/ or cake/libs/model/datasources/.
* @return boolean True on success, null on failure or false if the class is already loaded
* @access public
* @static
*/