Package: Utility Functions

Functions
aes_256_decrypt() SmartFactory

Decrypts the text previously encrypted with the AES 256 using a password key.

aes_256_encrypt() SmartFactory

Encrypts the text with the AES 256 using a password key.

array_to_dom() SmartFactory

Converts an array to XML DOM structure.

array_to_json() SmartFactory

Converts the array to JSON string.

common_prefix() SmartFactory

Defines the common prefix of two strings.

dom_to_array() SmartFactory

Converts a XML DOM structure to an array.

escape_html() SmartFactory

Escapes the HTML special characters in the text.

escape_html_array() SmartFactory

Escapes recursively the HTML special characters in the values of the array.

escape_js() SmartFactory

Escapes the JavaScript special characters in the text.

format_number() SmartFactory

Formats the number due to the specified settings.

get_cookie() SmartFactory

Gets the cookie value by name.

get_header() SmartFactory

Gets the header by its name.

is_associative() SmartFactory

Checks whether the array $array is associative.

is_web() SmartFactory

Checks whether the session is cmd client or web.

json_to_array() SmartFactory

Converts the JSON string to an array.

preg_p_escape() SmartFactory

Escapes the special characters in the text used for the regular expression pattern.

preg_pattern_quote() \

Function for escaping the special symbols for putting into the regexp pattern as a simple text in the pattern.

preg_r_escape() SmartFactory

Escapes the special characters in the text used for the regular expression replacement.

preg_replacement_quote() \

Function for escaping the special symbols for putting into the regexp pattern as a simple text.

set_cookie() SmartFactory

Sets the cookie name=value.

string_empty() SmartFactory

Checks whether the text is an empty string.

string_to_number() SmartFactory

Converts the string to number due to the specified settings.

timestamp() SmartFactory

Converts the string representing the date/time in the specified format to the timestap.