UrlConfig
class UrlConfig implements ConfigProvider
Properties
protected SchemeList | $allowedSchemes | ||
protected HostnameList | $disallowedHosts | ||
protected HostnameList | $restrictedHosts |
Methods
Constructor
Return an array-based representation of this object to be used for parsing
Allow a URL scheme
Disallow a hostname (or hostname mask) from being used in URLs
Remove a scheme from the list of allowed URL schemes
Return the list of allowed URL schemes
Allow a hostname (or hostname mask) to being used in URLs while disallowing everything else
Details
at line 35
__construct()
Constructor
at line 48
array|Dictionary|null
asConfig()
Return an array-based representation of this object to be used for parsing
NOTE: if this method was named getConfig() it could interfere with magic getters from the Configurable trait
at line 59
void
allowScheme(string $scheme)
Allow a URL scheme
at line 76
void
disallowHost(string $host, bool $matchSubdomains = true)
Disallow a hostname (or hostname mask) from being used in URLs
at line 92
void
disallowScheme(string $scheme)
Remove a scheme from the list of allowed URL schemes
at line 102
array
getAllowedSchemes()
Return the list of allowed URL schemes
at line 116
void
restrictHost(string $host, bool $matchSubdomains = true)
Allow a hostname (or hostname mask) to being used in URLs while disallowing everything else
Can be called multiple times to restricts URLs to a set of given hostnames