* Category objects are immutable, strictly speaking. If you call methods that change the database,
* 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.
*/
class Category {
/** Name of the category, normalized to DB-key form */
$parentRevision = $this->grabCurrentRevision();
- $this->slotsOutput = [];
- $this->canonicalParserOutput = null;
-
// The edit may have already been prepared via api.php?action=stashedit
$stashedEdit = false;
'log_page' => $this->target->getArticleID(),
'log_params' => $this->params
];
- $data += CommentStore::getStore()->insert( $dbw, 'log_comment', $this->comment );
+ $data += MediaWikiServices::getInstance()->getCommentStore()->insert(
+ $dbw,
+ 'log_comment',
+ $this->comment
+ );
$data += ActorMigration::newMigration()->getInsertValues( $dbw, 'log_user', $this->doer );
$dbw->insert( 'logging', $data, __METHOD__ );
$newId = $dbw->insertId();
*
* @param array $store
* @param int $index
- * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text
+ * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|false
+ * @throws MWException
*/
public static function factory( array $store, $index ) {
if ( !isset( $store[$index] ) ) {
/**
* Convert a node to XML, for debugging
+ * @return string
*/
public function __toString() {
$inner = '';