ids = $ids; } /** * Creates a ChangeTags*List of the requested type. * * @param string $typeName 'revision' or 'logentry' * @param IContextSource $context * @param Title $title * @param array $ids * @return ChangeTagsList An instance of the requested subclass * @throws Exception If you give an unknown $typeName */ public static function factory( $typeName, IContextSource $context, Title $title, array $ids ) { switch ( $typeName ) { case 'revision': $className = ChangeTagsRevisionList::class; break; case 'logentry': $className = ChangeTagsLogList::class; break; default: throw new Exception( "Class $typeName requested, but does not exist" ); } return new $className( $context, $title, $ids ); } /** * Reload the list data from the master DB. */ function reloadFromMaster() { $dbw = wfGetDB( DB_MASTER ); $this->res = $this->doQuery( $dbw ); } /** * Add/remove change tags from all the items in the list. * * @param array $tagsToAdd * @param array $tagsToRemove * @param array $params * @param string $reason * @param User $user * @return Status */ abstract function updateChangeTagsOnAll( $tagsToAdd, $tagsToRemove, $params, $reason, $user ); }