Esempio n. 1
0
 public static function toArray($obj)
 {
     $_array = is_object($obj) ? get_object_vars($obj) : $obj;
     foreach ($_array as $key => $value) {
         $value = is_array($value) || is_object($value) ? Dawn::toArray($value) : $value;
         $array[$key] = $value;
     }
     return $array;
 }