Wikibase
MediaWiki Wikibase extension
|
UrlSchemeValidators is a collection of validators for some commonly used URL schemes. More...
Public Member Functions | |
getValidator ( $scheme) | |
Returns a validator for the given URL scheme, or null if no validator is defined for that scheme. | |
getValidators (array $schemes) | |
Given a list of schemes, this function returns a mapping for each supported scheme to a corresponding ValueValidator. | |
UrlSchemeValidators is a collection of validators for some commonly used URL schemes.
This is intended for conveniently supplying a map of validators to UrlValidator.
Wikibase\Repo\Validators\UrlSchemeValidators::getValidator | ( | $scheme | ) |
Returns a validator for the given URL scheme, or null if no validator is defined for that scheme.
'bitcoin', 'geo', 'magnet', 'news', 'sip', 'sips', 'sms', 'tel', 'urn', 'xmpp'.
protocol relative '//'.
string | $scheme | e.g. 'http'. |
Wikibase\Repo\Validators\UrlSchemeValidators::getValidators | ( | array | $schemes | ) |
Given a list of schemes, this function returns a mapping for each supported scheme to a corresponding ValueValidator.
If the schema isn't supported, no mapping is created for it.
string[] | $schemes | a list of scheme names, e.g. 'http'. |