Utility class providing common functions
package |
Framework |
---|---|
subpackage |
Utils |
check_email(string $email, boolean $dns_check = true) : boolean
string
Email address
boolean
True to check dns
boolean
True on success, False if address is invalid
check_ip(string $ip) : bool
string
IP address in v4 or v6 format
bool
True if the address is valid
check_referer() : boolean
boolean
True if referer is the same host+path, false if not
rep_specialchars_output($str, $enctype = '', $mode = '', $newlines = true) : string
string
The quoted string
get_input_value($fname, $source, $allow_html = FALSE, $charset = NULL) : string
string
Field value or NULL if not available
parse_input_value($value, $allow_html = FALSE, $charset = NULL) : string
string
Parsed value
request2param(int $mode = null, string $ignore = 'task|action', boolean $allow_html = false) : array
int
Source to get value from (GPC)
string
PCRE expression to skip parameters by name
boolean
Allow HTML tags in field value
array
Hash array with all request parameters
html_identifier($str, $encode = false)
mod_css_styles($source, $container_id, $allow_remote = false) : string
string
Modified CSS source
file2class(string $mimetype, string $filename) : string
string
Mimetype
string
Filename
string
CSS classes separated by space
xss_entity_decode($content) : string
string
Decoded string
xss_entity_decode_callback(array $matches) : string
array
Result from preg_replace_callback
string
Decoded entity
mem_check($need) : boolean
boolean
True if memory won't be exceeded, False otherwise
https_check(integer $port = null, boolean $use_https = true) : boolean
integer
HTTPS port number
boolean
Enables 'use_https' option checking
boolean
parse_host(string $name, string $host = '') : string
string
Hostname
string
Optional IMAP hostname
string
Hostname
remote_ip() : string
string
Remote IP address(es)
remote_addr() : string
string
Remote IP address
request_header(string $name) : mixed
string
Header name
mixed
Header value or null if not available
explode_quoted_string($delimiter, $string) : array
array
String items
strtotime(string $date) : int
string
Date string
int
Unix timestamp
anytodatetime(string $date) : object
string
Date string
object
DateTime instance or false on failure
clean_datestr(string $date) : string
string
Date string
string
Date string
idn_to_ascii($str)
idn_to_utf8($str)
idn_convert($input, $is_utf = false)
tokenize_string($str) : array
array
List of tokens
normalize_string($str, $as_array = false) : mixed
Currently only optimized for Latin-1 characters; to be extended
mixed
Normalized string or a list of normalized tokens
get_opt(array $aliases = array()) : array
array
Argument alias names
array
Argument values hash
prompt_silent($prompt = "Password:") : string
string
Password
get_boolean(string $str) : boolean
string
Input value
boolean
Boolean value
INPUT_GET
INPUT_POST
INPUT_GPC