Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0408483aa8 |
@@ -1112,6 +1112,37 @@ class Basic
|
|||||||
return $ret_array;
|
return $ret_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// METHOD: arrayToString
|
||||||
|
// WAS : ArrayToString
|
||||||
|
// PARAMS: array, connect char
|
||||||
|
// RETRUN: string
|
||||||
|
// DESC : wrapper for join, but checks if input is an array and if not returns null
|
||||||
|
public static function arrayToString($array, $connect_char)
|
||||||
|
{
|
||||||
|
if (is_array($array)) {
|
||||||
|
return join($connect_char, $array);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// METHOD: flattenArray
|
||||||
|
// PARAMS: array in multi dimensions
|
||||||
|
// RETURN: returns a flatten array
|
||||||
|
// DESC : converts multi dimensional array to a flat array
|
||||||
|
// does NOT preserve keys
|
||||||
|
public static function flattenArray(array $array)
|
||||||
|
{
|
||||||
|
$return = array();
|
||||||
|
array_walk_recursive(
|
||||||
|
$array,
|
||||||
|
function ($a) use (&$return) {
|
||||||
|
$return[] = $a;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
|
||||||
// METHOD: __mbMimeEncode
|
// METHOD: __mbMimeEncode
|
||||||
// WAS : _mb_mime_encode
|
// WAS : _mb_mime_encode
|
||||||
// PARAMS: string to encode, encoding to encode in
|
// PARAMS: string to encode, encoding to encode in
|
||||||
@@ -1373,20 +1404,6 @@ class Basic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// METHOD: arrayToString
|
|
||||||
// WAS : ArrayToString
|
|
||||||
// PARAMS: array, connect char
|
|
||||||
// RETRUN: string
|
|
||||||
// DESC : wrapper for join, but checks if input is an array and if not returns null
|
|
||||||
public static function arrayToString($array, $connect_char)
|
|
||||||
{
|
|
||||||
if (is_array($array)) {
|
|
||||||
return join($connect_char, $array);
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// METHOD: createThumbnail
|
// METHOD: createThumbnail
|
||||||
// WAS : CreateThumbnail
|
// WAS : CreateThumbnail
|
||||||
// PARAMS: pic -> picture where from we create a thumbnail
|
// PARAMS: pic -> picture where from we create a thumbnail
|
||||||
|
|||||||
Reference in New Issue
Block a user