FusionDirectory
|
This class provides various test functions. More...
Static Public Member Functions | |
static | is_phone_nr ($nr) |
Test if the given string is a phone number. More... | |
static | is_dns_name ($str) |
Test if the given string contains characters allowed in a DNS record name. More... | |
static | is_valid_hostname ($str) |
Test if the given string contains characters allowed in a hostname. More... | |
static | is_url ($url) |
Test if the given string is an URL. More... | |
static | is_dn ($dn) |
Test if the given string is a DN. More... | |
static | is_uid ($uid) |
Test if the given string is an uid. More... | |
static | is_ip ($ip) |
Test if the given string is an IP (v4 or v6) More... | |
static | is_ipv4 ($ip) |
Test if the given string is an IPv4. More... | |
static | is_ipv6 ($ip) |
Test if the given string is an IPv6. More... | |
static | is_mac ($mac) |
Test if the given string is a mac address. More... | |
static | is_ip_with_subnetmask ($ip) |
Checks if the given ip address doesn't match "is_ip" because there is also a sub net mask given. More... | |
static | is_domain ($str) |
Simple is domain check. More... | |
static | is_id ($id) |
Check if the given argument is an id. More... | |
static | is_path ($path) |
Check if the given argument is a path. More... | |
static | is_email ($address) |
Check if the given argument is an email. More... | |
This class provides various test functions.
This class provides various test functions. It enables to check if a given value is:
The functions need to be handled with care, because they are not as strict as one might expect.
Definition at line 41 of file class_tests.inc.
|
static |
Test if the given string is a DN.
string | $dn | The DN to check |
Definition at line 101 of file class_tests.inc.
|
static |
Test if the given string contains characters allowed in a DNS record name.
string | $str | The DNS to check |
Definition at line 63 of file class_tests.inc.
|
static |
Simple is domain check.
This checks if the given string looks like "string(...).string"
string | $str | The domain to check |
Definition at line 225 of file class_tests.inc.
|
static |
Check if the given argument is an email.
string | $address | The email address |
Definition at line 269 of file class_tests.inc.
References in_array_ics(), and is_ipv4().
|
static |
Check if the given argument is an id.
string | $id | The id to check |
Definition at line 236 of file class_tests.inc.
Referenced by ldapSizeLimit\update().
|
static |
Test if the given string is an IP (v4 or v6)
string | $ip | The IP to check |
Definition at line 136 of file class_tests.inc.
|
static |
Checks if the given ip address doesn't match "is_ip" because there is also a sub net mask given.
string | $ip | The IP to check |
Definition at line 179 of file class_tests.inc.
|
static |
Test if the given string is an IPv4.
string | $ip | The IPv4 to check |
Definition at line 146 of file class_tests.inc.
Referenced by is_email().
|
static |
Test if the given string is an IPv6.
string | $ip | The IPv6 to check |
Definition at line 156 of file class_tests.inc.
|
static |
Test if the given string is a mac address.
string | $mac | The MAC address to check |
Definition at line 167 of file class_tests.inc.
|
static |
Check if the given argument is a path.
string | $path | The path to check |
Definition at line 251 of file class_tests.inc.
|
static |
Test if the given string is a phone number.
string | $nr | The phone number to check |
Definition at line 48 of file class_tests.inc.
|
static |
Test if the given string is an uid.
string | $uid | The UID to check |
Definition at line 116 of file class_tests.inc.
References strict_uid_mode().
|
static |
Test if the given string is an URL.
string | $url | The URL to check |
Definition at line 85 of file class_tests.inc.
|
static |
Test if the given string contains characters allowed in a hostname.
string | $str | The hostname to check |
Definition at line 74 of file class_tests.inc.