By default, core adds those fields as null to each row. provideThumbnail and provideDescription hooks are introduced. Extension should subscribe on the hooks to provide a thumbnail and description respectively. Bug: T250144 Change-Id: I42c6c8ff9d887a440174af2a21c7921573b06640
46 lines
809 B
PHP
46 lines
809 B
PHP
<?php
|
|
namespace MediaWiki\Rest\Entity;
|
|
|
|
/**
|
|
* Lightweight value class representing a page identity
|
|
*
|
|
* @unstable
|
|
* @note This class is temorary solution. It will be replaced by the one from:
|
|
* https://phabricator.wikimedia.org/T208776
|
|
*/
|
|
class SearchResultPageIdentityValue implements SearchResultPageIdentity {
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
private $id = 0;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $dbKey = '';
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
private $namespace = null;
|
|
|
|
public function __construct( int $id, int $namespace, string $dbKey ) {
|
|
$this->id = $id;
|
|
$this->namespace = $namespace;
|
|
$this->dbKey = $dbKey;
|
|
}
|
|
|
|
public function getId(): int {
|
|
return $this->id;
|
|
}
|
|
|
|
public function getNamespace(): int {
|
|
return $this->namespace;
|
|
}
|
|
|
|
public function getDBkey(): string {
|
|
return $this->dbKey;
|
|
}
|
|
|
|
}
|