mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-14 19:26:08 +00:00
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';
|
||
|
}
|
||
|
}
|