* like to refresh link counts, the objects will be appropriately reinitialized.
* Member variables are lazy-initialized.
*
- * TODO: Move some stuff from CategoryPage.php to here, and use that.
+ * @todo Move some stuff from CategoryPage.php to here, and use that.
*/
class Category {
/** Name of the category, normalized to DB-key form */
if ( !$row ) {
# Okay, there were no contents. Nothing to initialize.
if ( $this->mTitle ) {
- # If there is a title object but no record in the category table, treat this as an empty category
+ # If there is a title object but no record in the category table,
+ # treat this as an empty category.
$this->mID = false;
$this->mName = $this->mTitle->getDBkey();
$this->mPages = 0;
/**
* Factory function.
*
- * @param $title Title for the category page
- * @return Category|bool on a totally invalid name
+ * @param Title $title Title for the category page
+ * @return Category|bool On a totally invalid name
*/
public static function newFromTitle( $title ) {
$cat = new self();
/**
* Factory function.
*
- * @param $id Integer: a category id
+ * @param int $id A category id
* @return Category
*/
public static function newFromID( $id ) {
/**
* Factory function, for constructing a Category object from a result set
*
- * @param $row result set row, must contain the cat_xxx fields. If the fields are null,
- * the resulting Category object will represent an empty category if a title object
- * was given. If the fields are null and no title was given, this method fails and returns false.
- * @param Title $title optional title object for the category represented by the given row.
- * May be provided if it is already known, to avoid having to re-create a title object later.
+ * @param object $row Result set row, must contain the cat_xxx fields. If the
+ * fields are null, the resulting Category object will represent an empty
+ * category if a title object was given. If the fields are null and no
+ * title was given, this method fails and returns false.
+ * @param Title $title Optional title object for the category represented by
+ * the given row. May be provided if it is already known, to avoid having
+ * to re-create a title object later.
* @return Category
*/
public static function newFromRow( $row, $title = null ) {
# but we can't know that here...
return false;
} else {
- $cat->mName = $title->getDBkey(); # if we have a title object, fetch the category name from there
+ # if we have a title object, fetch the category name from there
+ $cat->mName = $title->getDBkey();
}
$cat->mID = false;
/**
* Fetch a TitleArray of up to $limit category members, beginning after the
* category sort key $offset.
- * @param $limit integer
- * @param $offset string
- * @return TitleArray object for category members.
+ * @param int $limit
+ * @param string $offset
+ * @return TitleArray TitleArray object for category members.
*/
public function getMembers( $limit = false, $offset = '' ) {
wfProfileIn( __METHOD__ );