}
$req = MWHttpRequest::factory( $url, $options, __METHOD__ );
- $req->setUserAgent( ForeignAPIRepo::getUserAgent() );
+ $req->setUserAgent( self::getUserAgent() );
$status = $req->execute();
if ( $status->isOK() ) {
$cache = ObjectCache::getMainWANInstance();
return $cache->getWithSetCallback(
- $this->getLocalCacheKey( get_class( $this ), $target, md5( $url ) ),
+ $this->getLocalCacheKey( static::class, $target, md5( $url ) ),
$cacheTTL,
function ( $curValue, &$ttl ) use ( $url, $cache ) {
$html = self::httpGet( $url, 'default', [], $mtime );
* @throws MWException
*/
function enumFiles( $callback ) {
- throw new MWException( 'enumFiles is not supported by ' . get_class( $this ) );
+ throw new MWException( 'enumFiles is not supported by ' . static::class );
}
/**
* @throws MWException
*/
protected function assertWritableRepo() {
- throw new MWException( get_class( $this ) . ': write operations are not supported.' );
+ throw new MWException( static::class . ': write operations are not supported.' );
}
}