src/Didww/API2/Object.php
public function toArray($options = array())
    {
        $result = array();
        foreach (get_object_vars($this) as $key => $value) {
            if ($key[0] == '_') {
                continue;
            }
            if ($value instanceof Object) {
                $value = $value->toArray($options);
            }
            $result[\Didww\Utils\StringUtil::snakeCase($key)] = $value;
        }
        return $result;
    }
public function toArray($options = array())
    {
        $result = array();
        foreach (get_object_vars($this) as $key => $value) {
            if ($key[0] == '_') {
                continue;
            }
            if ($value instanceof Object) {
                $value = $value->toArray($options);
            }
            $result[\Didww\Utils\StringUtil::snakeCase($key)] = $value;
        }
        return $result;
    }
convert object to array with snaked keys
@param array $options
@return array