Defines validators for the basic well known data types supported by Wikibase.
More...
Defines validators for the basic well known data types supported by Wikibase.
- Warning
- : This is a low level factory for use by bootstrap code only! Program logic should use an instance of DataTypeValidatorFactory.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
- Parameters
-
EntityLookup | $lookup | |
EntityIdParser | $idParser | |
string[] | $urlSchemes | |
string | $itemVocabularyBaseUri | The base URI for vocabulary concepts. |
ContentLanguages | $contentLanguages | |
CachingCommonsMediaFileNameLookup | $cachingCommonsMediaFileNameLookup | |
MediaWikiPageNameNormalizer | $mediaWikiPageNameNormalizer | |
string | $geoShapeStorageApiUrl | |
string | $tabularDataStorageApiUrl | |
◆ buildCoordinateValidators()
Wikibase\Repo\ValidatorBuilders::buildCoordinateValidators |
( |
| ) |
|
◆ buildEntitySchemaValidators()
Wikibase\Repo\ValidatorBuilders::buildEntitySchemaValidators |
( |
| ) |
|
◆ buildEntityValidators()
Wikibase\Repo\ValidatorBuilders::buildEntityValidators |
( |
| ) |
|
◆ buildGeoShapeValidators()
Wikibase\Repo\ValidatorBuilders::buildGeoShapeValidators |
( |
|
$checkExistence = 'checkExistence' | ) |
|
- Parameters
-
string | $checkExistence | Either 'checkExistence' or 'doNotCheckExistence' |
- Returns
- ValueValidator[]
◆ buildItemValidators()
Wikibase\Repo\ValidatorBuilders::buildItemValidators |
( |
| ) |
|
◆ buildMediaValidators()
Wikibase\Repo\ValidatorBuilders::buildMediaValidators |
( |
|
$checkExistence = 'checkExistence' | ) |
|
- Parameters
-
string | $checkExistence | Either 'checkExistence' or 'doNotCheckExistence' |
- Returns
- ValueValidator[]
◆ buildMonolingualTextValidators()
Wikibase\Repo\ValidatorBuilders::buildMonolingualTextValidators |
( |
|
$maxLength = 400 | ) |
|
- Parameters
-
int | $maxLength | Defaults to 400 characters. This was an arbitrary decision and simply copied the default of the CommonStringValidators |
- Returns
- ValueValidator[]
◆ buildPropertyValidators()
Wikibase\Repo\ValidatorBuilders::buildPropertyValidators |
( |
| ) |
|
◆ buildQuantityValidators()
Wikibase\Repo\ValidatorBuilders::buildQuantityValidators |
( |
| ) |
|
◆ buildStringValidators()
Wikibase\Repo\ValidatorBuilders::buildStringValidators |
( |
|
$maxLength = 400 | ) |
|
- Parameters
-
- Returns
- ValueValidator[]
◆ buildTabularDataValidators()
Wikibase\Repo\ValidatorBuilders::buildTabularDataValidators |
( |
|
$checkExistence = 'checkExistence' | ) |
|
- Parameters
-
string | $checkExistence | Either 'checkExistence' or 'doNotCheckExistence' |
- Returns
- ValueValidator[]
◆ buildTimeValidators()
Wikibase\Repo\ValidatorBuilders::buildTimeValidators |
( |
| ) |
|
◆ buildUrlValidators()
Wikibase\Repo\ValidatorBuilders::buildUrlValidators |
( |
|
$maxLength = 500 | ) |
|
- Parameters
-
- Returns
- ValueValidator[]
◆ getCommonStringValidators()
Wikibase\Repo\ValidatorBuilders::getCommonStringValidators |
( |
|
$maxLength = 400 | ) |
|
|
private |
- Parameters
-
int | $maxLength | Defaults to 400 characters. This was an arbitrary decision when it turned out that 255 was to short for descriptions. |
- Returns
- ValueValidator[]
◆ getEntityValidators()
Wikibase\Repo\ValidatorBuilders::getEntityValidators |
( |
|
$entityType = null | ) |
|
- Parameters
-
- Returns
- ValueValidator[]
◆ getPrefixValidator()
Wikibase\Repo\ValidatorBuilders::getPrefixValidator |
( |
|
$prefix, |
|
|
|
$errorCode |
|
) |
| |
|
private |
- Parameters
-
string | $prefix | |
string | $errorCode | |
- Returns
- RegexValidator
◆ getUrlValidator()
Wikibase\Repo\ValidatorBuilders::getUrlValidator |
( |
array |
$urlSchemes, |
|
|
|
$prefix = null , |
|
|
|
$maxLength = 500 |
|
) |
| |
|
private |
- Parameters
-
string[] | $urlSchemes | List of URL schemes, e.g. 'http' |
string | null | $prefix | a required prefix |
int | $maxLength | Defaults to 500 characters. Even if URLs are unlimited in theory they should be limited to about 2000. About 500 is a reasonable compromise. |
- See also
- http://stackoverflow.com/a/417184
- Returns
- CompositeValidator
◆ $contentLanguages
Wikibase\Repo\ValidatorBuilders::$contentLanguages |
|
private |
◆ $entityIdParser
Wikibase\Repo\ValidatorBuilders::$entityIdParser |
|
private |
◆ $entityLookup
Wikibase\Repo\ValidatorBuilders::$entityLookup |
|
private |
◆ $geoShapeStorageApiUrl
Wikibase\Repo\ValidatorBuilders::$geoShapeStorageApiUrl |
|
private |
◆ $itemVocabularyBaseUri
Wikibase\Repo\ValidatorBuilders::$itemVocabularyBaseUri |
|
private |
◆ $mediaFileNameLookup
Wikibase\Repo\ValidatorBuilders::$mediaFileNameLookup |
|
private |
◆ $mediaWikiPageNameNormalizer
Wikibase\Repo\ValidatorBuilders::$mediaWikiPageNameNormalizer |
|
private |
◆ $tabularDataStorageApiUrl
Wikibase\Repo\ValidatorBuilders::$tabularDataStorageApiUrl |
|
private |
◆ $urlSchemes
Wikibase\Repo\ValidatorBuilders::$urlSchemes |
|
private |
◆ $wikidataBaseUri
Wikibase\Repo\ValidatorBuilders::$wikidataBaseUri = 'http://www.wikidata.org/entity/' |
|
private |
The documentation for this class was generated from the following file: