Returns a result array that's often used in multistatus responses.

The array uses status codes as keys, and property names and value pairs
as the value of the top array.. such as :

[
200 => [ '{DAV:}displayname' => 'foo' ],
]

@return array
347127
public function getResultForMultiStatus()
    {
        $r = [
            200 => [],
            404 => [],
        ];
        foreach ($this->result as $propertyName => $info) {
            if (!isset($r[$info[0]])) {
                $r[$info[0]] = [$propertyName => $info[1]];
            } else {
                $r[$info[0]][$propertyName] = $info[1];
            }
        }
        // Removing the 404's for multi-status requests.
        if (self::ALLPROPS === $this->requestType) {
            unset($r[404]);
        }

        return $r;
    }
968795
public function toArray()
    {
        $data = array();
        $map = array(
            'id' => 'getId',
            'name' => 'getName',
            'source_type' => 'getSourceType',
            'status' => 'getStatus',
            'parameters' => 'getParameters',
            'auth' => 'getAuth',
            'resources' => 'getResources',
            'created_at' => 'getCreatedAt',
            'validate' => 'getValidate'
        );

        foreach ($map as $key => $getter) {
            $data[$key] = $this->$getter();
        }

        foreach (array('auth', 'resources', 'parameters') as $key) {
            if (isset($data[$key])) {
                $data[$key] = json_encode($data[$key]);
            }
        }

        return $data;
    }
218824
public function getSendStatistics()
    {
        $this->_action = 'GetSendStatistics';
        $this->_method = 'GET';
        $this->_refreshDate();

        $this->_generateSignature();
        $res = $this->_request();
        if ($res['code'] == 200) {
            $result = $res['body']->GetSendStatisticsResult->SendDataPoints->member;
            return array(
                'Complaints' => (string) $result->Complaints,
                'Rejects' => (string) $result->Rejects,
                'Bounces' => (string) $result->Bounces,
                'DeliveryAttempts' => (string) $result->DeliveryAttempts,
                'Timestamp' => (string) $result->Timestamp
            );
        } else {
            return new SimpleEmailServiceError((string) $res['body']->Error->Code);
        }
    }
513590
public function getDataAsArray()
    {
        $fields = $this->getFields();

        if (!$fields) {
            return [];
        }

        $result = [];

        foreach ($fields as $field) {
            //ignore non-fields
            if (!$field instanceof AbstractFormField) {
                continue;
            }

            // if a field is disabled, we will ignore the field and only set an empty string as value
            if ($field->isDisabled()) {
                if (!array_key_exists($field->getName(), $result)) {
                    $result[$field->getName()] = '';
                }
                continue;
            }


            if ($field instanceof CheckBox) {
                $result[$field->getName()] = $field->isChecked() ? $field->getValue() : '';
            } elseif ($field instanceof RadioButton) {
                // if the field is not checked...
                if (!$field->isChecked()) {
                    // there was no other field with the same name yet
                    if (!array_key_exists($field->getName(), $result)) {
                        // then set the field with an empty value
                        $result[$field->getName()] = '';
                    }
                } // the field is checked
                else {
                    $result[$field->getName()] = $field->getValue();
                }
            } elseif ($field instanceof UploadField) {
                $value = $field->getValue();
                if (!$value ||
                    !isset($value['error']) ||
                    $value['error'] == UPLOAD_ERR_NO_FILE ||
                    empty($value['name'])
                ) {
                    continue;
                }
                $result[$field->getName()] = $value['name'];
            } elseif ($field instanceof AbstractFormField) {
                $result[$field->getName()] = $field->getValue();
            }
        }
        return $result;
    }
1006169
public function getResult()

    {
        $bodyParams = $this->attributes;


        $response = $this->_connection->post(
            Urls::URL_TRAVERSAL,
            $this->getConnection()->json_encode_wrapper($bodyParams)
        );

        return $response->getJson();
    }
1246043
public function toMappedArray()
    {
        $values = $this->toArray();
        $mappedValues = [];
        foreach ($values as $key => $value) {
            $mappedValues[$key] = $this->readMapped($key);
        }

        return $mappedValues;
    }
1280779
public function getArray()
  {
    $errors = empty($this->errors) ? null : $this->errors;

    $response = array(
        'status' => $this->getStatus(),
        'data'   => $this->data,
        'errors' => $errors,
    );

    if (!is_null($this->code)) {
      $response['code'] = $this->code;
    }

    if (!is_null($this->message)) {
      $response['message'] = $this->message;
    }

    return $response;
  }
600641
public function getArrayKeys()
    {
        $returnValue = [];

        foreach (array_keys($this->getArrayCopy()) as $key) {
            if ($key != '_type') {
                $returnValue[] = $key;
            }
        }

        return $returnValue;
    }
1137221
protected function getArray()
    {
        $key         = $this->getRangeKey()->getPropertyMetadata()->name;
        $array       = parent::getArray();
        $array[$key] = $this->getRangeValue();

        return $array;
    }
1150989
public function getResultsAsArray()
    {
        $new = array();
        foreach ((array) $this->results as $result) {
            if ($result instanceof Object)
                $new[] = $result->toArray();
            else if (is_array($result))
                return $this->results;
            else
                throw new Exception('Cannot convert to array: '.ClassUtils::getQualifiedType($result));
        }
        return $new;
    }
35674
public function get_array() {
	$response = array();
	
	// links
	if ($this->links) {
		$response['links'] = $this->links;
	}
	
	// primary data
	$response['data'] = $this->primary_collection;
	
	// included resources
	if ($this->included_data) {
		$response['included'] = array_values($this->included_data);
	}
	
	// meta data
	if ($this->meta_data) {
		$response['meta'] = $this->meta_data;
	}
	
	return $response;
}
883340
public function toArray()
    {
        $arrayResult = array(
            'affected' => $this->getAffected(),
            'insertId' => $this->getInsertId(),
            'startRow' => $this->getStartRow(),
            'totalRows' => $this->getTotalRows(),
            'totalShows' => $this->getTotalShows(),
            'start' => $this->getStart(),
            'end' => $this->getEnd(),
            'seconds' => $this->getSeconds(),
            'types' => $this->getTypes(),
            'columns' => $this->getColumns(),
            'data' => array(),
        );

        if ($this->dataType instanceof DataInterface) {
            for ($i = 0; $i < $this->length(); ++$i) {
                if ($this->hasIndex($i)) {
                    $arrayResult['data'][] = $this->getIndex($i)->toArray();
                }
            }
        } else {
            $arrayResult['data'] = $this->getArrayCopy();
        }

        return $arrayResult;
    }
1315478
public function getData()
    {
        $this->validate();

        $result = $this->getResult();

        if (substr($result, 0, 3) == '{\"') {
            $result = stripslashes($result);
        }

        $response = json_decode($result, true);

        $data              = $response[$this->key];
        $data['sign']      = $response['sign'];
        $data['sign_type'] = $response['sign_type'];

        return $data;
    }
1149424
public function toArray()
    {
        return array(
            'e' => $this->entity,
            'r' => $this->reference,
            'v' => $this->value,
            'k' => $this->authorizationKey,
            's' => $this->status,
            't_key' => $this->key,
        );
    }
962091
public function statusCodes(): array
    {
        return array_map(
                function($status)
                {
                    return new Status($status->getCode(), $status->getDescription());
                },
                $this->annotations->named('Status')
        );
    }
1139920
public function toArray()
	{
		$list = parent::toArray();

		$list[$this->_prefix . 'code'] = $this->getCode();
		$list[$this->_prefix . 'domain'] = $this->getDomain();
		$list[$this->_prefix . 'label'] = $this->getLabel();
		$list[$this->_prefix . 'status'] = $this->getStatus();

		return $list;
	}
1351311
public function toArray()
    {
        if ($this->getResponseType() == 'application/json')
        {
            $response = $this->convertJsonToArray($this->getBody());
        }
        elseif ($this->getResponseType() == 'application/binary')
        {
            $response = $this->convertSerializedToArray($this->getBody());
        }
        else
        {
            $response = null;
        }

        if ( ! is_array($response))
        {
            $this->throwResponseConversionException();
        }

        return $response;
    }