ZenMagick 0.9.8


org.zenmagick.core.utils.ZMLangUtils
\core\utils\ZMLangUtils.php at line 30

Class ZMLangUtils

ZMLangUtils

public class ZMLangUtils

Language utils.

Author:
DerManoMann
Version:
$Id: ZMLangUtils.php 2556 2009-10-31 07:38:13Z dermanomann $

Method Summary
static boolean

asBoolean(mixed value)

Evaluate a string value as boolean.

static boolean

endsWith(string s, string end)

Check if the given string ends with the provided string.

static boolean

inArray(string value, mixed array)

Check if the given value exists in the array or comma separated list.

static boolean

isEmpty(mixed value)

Check if a given value or array is empty.

static string

mkUnique(var arg)

Create a unique key from all given parameters.

static boolean

startsWith(string s, string start)

Check if the given string starts with the provided string.

static array

toArray(mixed value)

Convert values to array where reasonable.

Method Detail

\core\utils\ZMLangUtils.php at line 88

asBoolean

public static boolean asBoolean(mixed value)

Evaluate a string value as boolean.

Parameters:
value - The value.
Returns:
The boolean value.

\core\utils\ZMLangUtils.php at line 63

endsWith

public static boolean endsWith(string s, string end)

Check if the given string ends with the provided string.

Parameters:
s - The haystack.
end - The needle.
Returns:
true if $s ends with $start, false if not.

\core\utils\ZMLangUtils.php at line 75

inArray

public static boolean inArray(string value, mixed array)

Check if the given value exists in the array or comma separated list.

Parameters:
value - The value to search for.
array - Either an array or a string containing a comma separated list.
Returns:
true if the given value exists in the array, false if not.

\core\utils\ZMLangUtils.php at line 38

isEmpty

public static boolean isEmpty(mixed value)

Check if a given value or array is empty.

Parameters:
value - The value or array to check.
Returns:
true if the value is empty or null, false if not.

\core\utils\ZMLangUtils.php at line 124

mkUnique

public static string mkUnique(var arg)

Create a unique key from all given parameters.

Parameters:
arg - Arguments.
Returns:
a unique key based on the arguments.

\core\utils\ZMLangUtils.php at line 50

startsWith

public static boolean startsWith(string s, string start)

Check if the given string starts with the provided string.

Parameters:
s - The haystack.
start - The needle.
Returns:
true if $s starts with $start, false if not.

\core\utils\ZMLangUtils.php at line 101

toArray

public static array toArray(mixed value)

Convert values to array where reasonable.

Parameters:
value - The value to convert; either already an array or a URL query form string.
Returns:
The value as array.

ZenMagick 0.9.8