* @param FileRepo $repo
* @param null $unused
*
- * @return self
+ * @return static
*/
static function newFromTitle( $title, $repo, $unused = null ) {
- return new self( $title, $repo );
+ return new static( $title, $repo );
}
/**
* @param stdClass $row
* @param FileRepo $repo
*
- * @return self
+ * @return static
*/
static function newFromRow( $row, $repo ) {
$title = Title::makeTitle( NS_FILE, $row->img_name );
- $file = new self( $title, $repo );
+ $file = new static( $title, $repo );
$file->loadFromRow( $row );
return $file;
$conds['img_timestamp'] = $dbr->timestamp( $timestamp );
}
- $fileQuery = self::getQueryInfo();
+ $fileQuery = static::getQueryInfo();
$row = $dbr->selectRow(
$fileQuery['tables'], $fileQuery['fields'], $conds, __METHOD__, [], $fileQuery['joins']
);
if ( $row ) {
- return self::newFromRow( $row, $repo );
+ return static::newFromRow( $row, $repo );
} else {
return false;
}