FUEL CMS User Guide : Version 1.5.2


Convert Helper

This helper is to help aid in common conversions of popular formats from one to another. I got the ascii_to_hex function and hex_to_ascii function somewhere but didn't document where for some reason

Function Reference [+]

ascii_to_hex('$ascii')

Convert ascii characters to hex values.

Returns

string

Parameters

(string) $ascii string containing ascii characters

hex_to_ascii('$hex')

Convert ascii characters to hex values.

Returns

string

Parameters

(string) $hex string containing ascii characters

uri_safe_encode('$str', ['$hexify'=TRUE])

Convert a string into a safe, encoded uri value.

Returns

string

Parameters

(string) $str string to be converted
(boolean) $hexify convert to hex value

uri_safe_decode('$str', ['$hexify'=TRUE])

Decode a base64 encoded string.

Returns

string

Parameters

(string) $str string to be converted
(boolean) $hexify value is hexified

uri_safe_batch_encode('$uri', ['$delimiter'='|'], ['$hexify'=TRUE])

Encode a key/value array or string into a URI safe value.

Returns

string

Parameters

(string) $uri string to be converted
(boolean) $delimiter value is hexified

uri_safe_batch_decode('$str', ['$delimiter'='|'], ['$hexify'=TRUE])

Decode a key/value array or string into a URI safe value.

Returns

string

Parameters

(string) $str string to be converted
(string) $delimiter delimiter to split string
(boolean) $hexify value is hexified