pickles/classes/ArrayUtils.php
Josh Sherman 046d265347 Added the new classes and stuff.
git-svn-id: http://svn.cleancode.org/svn/pickles@30 4d10bc64-7434-11dc-a737-d2d0f8310089
2008-07-12 23:28:44 +00:00

21 lines
291 B
PHP
Executable file

<?php
class ArrayUtils {
public static function object2array($object) {
if (is_object($object)) {
$object = (array)$object;
}
foreach ($object as $key => $value) {
if (is_object($value)) {
$object[$key] = self::object2array($value);
}
}
return $object;
}
}
?>