mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-24 05:13:10 +00:00
0be18dc97d
Also fix the name of one test file to match the file name Change-Id: If622e925645cf21bf726f4db0f779182d78bbd73
25 lines
638 B
PHP
25 lines
638 B
PHP
<?php
|
|
|
|
use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup;
|
|
|
|
class DummyPropertyDataTypeLookup implements PropertyDataTypeLookup {
|
|
/**
|
|
* @var int
|
|
*/
|
|
public static $mathId = 1;
|
|
|
|
/**
|
|
* Returns the data type for the Property of which the id is given.
|
|
*
|
|
* @since 2.0
|
|
*
|
|
* @param \Wikibase\DataModel\Entity\PropertyId $propertyId
|
|
*
|
|
* @return string
|
|
* @throws \Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookupException
|
|
*/
|
|
public function getDataTypeIdForProperty( \Wikibase\DataModel\Entity\PropertyId $propertyId ) {
|
|
return $propertyId->getNumericId() == self::$mathId ? 'math' : 'not-math';
|
|
}
|
|
}
|