protected static function loopDecode($data)
    {
        if (is_array($data)) {
            foreach ($data as &$value) {
                $value = self::loopDecode($value);
            }
        } elseif (is_object($data)) {
            return self::loopDecode((array) $data);
        }
        return $data;
    }
protected static function loopDecode($data)
    {
        if (is_array($data)) {
            foreach ($data as &$value) {
                $value = self::loopDecode($value);
            }
        } elseif (is_object($data)) {
            return self::loopDecode((array) $data);
        }
        return $data;
    }
protected static function loopDecode ( $ data ) { if ( is_array ( $ data ) ) { foreach ( $ data as & $ value ) { $ value = self :: loopDecode ( $ value ) ; } } elseif ( is_object ( $ data ) ) { return self :: loopDecode ( ( array ) $ data ) ; } return $ data ; }
Turns all the objects into arrays
@param  mixed $data Data
@return array
Turns all the objects into arrays