* @since 1.17
*
* @param string $caller
+ * @return self (since 1.32)
*/
public function setCaller( $caller ) {
$this->caller = $caller;
+
+ return $this;
}
/**
if ( $this->isEmpty() ) {
return false;
}
+ $services = MediaWikiServices::getInstance();
- global $wgContLang;
- if ( !$wgContLang->needsGenderDistinction() ) {
+ if ( !$services->getContentLanguage()->needsGenderDistinction() ) {
return false;
}
- $genderCache = MediaWikiServices::getInstance()->getGenderCache();
+ $genderCache = $services->getGenderCache();
$genderCache->doLinkBatch( $this->data, $this->caller );
return true;