src/Message/Response.php
private function object2array($data)
    {
        if (is_array($data) || is_object($data)) {
            $result = array();
            foreach ($data as $key => $value) {
                $result[$key] = $this->object2array($value);
            }
            return $result;
        }
        return $data;
    }
private function object2array($data)
    {
        if (is_array($data) || is_object($data)) {
            $result = array();
            foreach ($data as $key => $value) {
                $result[$key] = $this->object2array($value);
            }
            return $result;
        }
        return $data;
    }
Convert object to array

@return array