Wikibase
MediaWiki Wikibase extension
|
Interface for EntityIds that can be converted to a positive, signed 32 bit integer in the range [1..2147483647], and back from the entity type and the number. More...
Public Member Functions | |
getNumericId () | |
Public Attributes | |
const | MAX = 2147483647 |
Interface for EntityIds that can be converted to a positive, signed 32 bit integer in the range [1..2147483647], and back from the entity type and the number.
The number must be distinct for different IDs. When an ID can not be represented as a distinct integer, an InvalidArgumentException must be thrown on construction time. For example, when "Q1" and "Q01" have the same integer representation, only one should be allowed.
Entity types that do not meet this criteria should not implement this interface.
Entity types are not required and not guaranteed to implement this interface. Use the full string serialization whenever you can and avoid using numeric IDs.
Wikibase\DataModel\Entity\Int32EntityId::getNumericId | ( | ) |
Implemented in Wikibase\DataModel\Entity\ItemId, and Wikibase\DataModel\Entity\NumericPropertyId.
const Wikibase\DataModel\Entity\Int32EntityId::MAX = 2147483647 |