$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.' );
}
}
}
protected function assertWritableRepo() {
- throw new MWException( get_class( $this ) . ': write operations are not supported.' );
+ throw new MWException( static::class . ': write operations are not supported.' );
}
/**
}
protected function assertWritableRepo() {
- throw new MWException( get_class( $this ) . ': write operations are not supported.' );
+ throw new MWException( static::class . ': write operations are not supported.' );
}
public function getInfo() {
}
protected function assertWritableRepo() {
- throw new MWException( get_class( $this ) . ': write operations are not supported.' );
+ throw new MWException( static::class . ': write operations are not supported.' );
}
}
* @throws MWException
*/
function readOnlyError() {
- throw new MWException( get_class( $this ) . ': write operations are not supported' );
+ throw new MWException( static::class . ': write operations are not supported' );
}
/**
* @param int $flags
*/
function loadFromDB( $flags = 0 ) {
- $fname = get_class( $this ) . '::' . __FUNCTION__;
+ $fname = static::class . '::' . __FUNCTION__;
# Unconditionally set loaded=true, we don't want the accessors constantly rechecking
$this->dataLoaded = true;
* This covers fields that are sometimes not cached.
*/
protected function loadExtraFromDB() {
- $fname = get_class( $this ) . '::' . __FUNCTION__;
+ $fname = static::class . '::' . __FUNCTION__;
# Unconditionally set loaded=true, we don't want the accessors constantly rechecking
$this->extraDataLoaded = true;
*/
public function nextHistoryLine() {
# Polymorphic function name to distinguish foreign and local fetches
- $fname = get_class( $this ) . '::' . __FUNCTION__;
+ $fname = static::class . '::' . __FUNCTION__;
$dbr = $this->repo->getReplicaDB();
*/
public function getDefinitionSummary( ResourceLoaderContext $context ) {
return [
- '_class' => get_class( $this ),
+ '_class' => static::class,
'_cacheEpoch' => $this->getConfig()->get( 'CacheEpoch' ),
];
}