\HEXONETUtil

HEXONET Util

Summary

Methods
Properties
Constants
commandEncode()
isAssociative()
responseToHash()
responseToListHash()
sqltime()
timesql()
urlEncode()
urlDecode()
base64Decode()
base64Encode()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

commandEncode()

commandEncode(mixed|string|int  commandarray) : 

Encode the command array in a command-string

Parameters

mixed|string|int commandarray

Command array

Returns

Encoded command as a string

isAssociative()

isAssociative(mixed|string|int  arr) : 

Returns true if associative array

Parameters

mixed|string|int arr

An array

Returns

True if associative array

responseToHash()

responseToHash(  response) : mixed|string|int

Convert the response string as a hash

Parameters

response

Returns

mixed|string|int —

The response as a hash

responseToListHash()

responseToListHash(  response) : mixed|string|int

Convert the response string as a list hash

Parameters

response

Returns

mixed|string|int —

The response as a list hash

sqltime()

sqltime(string|int  timestamp = null) : \HEXONET\datetime

Convert the Unix-Timestamp to a SQL datetime If no timestamp given, returns the current datetime

Parameters

string|int timestamp

A Unix-Timestamp or nothing

Returns

\HEXONET\datetime —

The SQL datetime

timesql()

timesql(\HEXONET\datetime  sqldatetime) : 

Convert the SQL datetime to Unix-Timestamp

Parameters

\HEXONET\datetime sqldatetime

The SQL datetime

Returns

A Unix-Timestamp

urlEncode()

urlEncode(  string) : 

URL-encodes string This function is convenient when encoding a string to be used in a query part of a URL

Parameters

string

The string

Returns

The encoded url string

urlDecode()

urlDecode(  string) : 

Decodes URL-encoded string Decodes any %## encoding in the given string.

Parameters

string

The encoded URL string

Returns

The decoded string

base64Decode()

base64Decode(  string) : 

Encodes data with MIME base64 This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.

Parameters

string

The string

Returns

The encoded base64 string

base64Encode()

base64Encode(  string) : 

Decodes data encoded with MIME base64

Parameters

string

The encoded base64 string

Returns

The decoded string