@brief Converts the current Model to an array for use as request parameters.

@return mixed[] Array of parameters to submit with an API request.
328988
public function toRequestParams()
    {
        $ret = array(
            "alias" => $this->_alias,
            "required" => $this->_required,
            "unique" => $this->_unique,
            "type" => $this->_type,
        );
        if (count($this->_options))
        {
            $ret["options"] = $this->_options;
        }
        if ($this->_id > 0)
        {
            $ret["id"] = $this->_id;
        }
        if ($this->_field !== null)
        {
            $ret["field"] = $this->_field;
        }
        return $ret;
    }
618470
public function getParametersArray()
    {
        $result = parent::getParametersArray();

        if (!empty($this->getRole())) {
            $result['f_role'] = $this->getRole();
        }

        return $result;
    }
1076443
public function toArray() {
        $data = array();
        foreach ($this->parameters as $parameter => $value) {
            if (is_object($value) && method_exists($value, 'toArray')) {
                $data[$parameter] = $value->toArray();
            } elseif (is_object($value)) {
                $data[$parameter] = get_object_vars($value);
            } else {
                $data[$parameter] = $value;
            }
        }

        return $data;
    }
963322
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'style' => $this->style,
            'type' => $this->type,
            'value' => $this->value,
            'confirm' => $this->confirm ? $this->confirm->toArray() : null,
        ];
    }
453468
public function toArray(): array
    {
        return  [
            'countryCode' => $this->getCountryCode(),
            'vatNumber'   => $this->getVatNumber(),
            'requestDate' => $this->getRequestDate()->format('Y-m-d'),
            'valid'       => $this->isValid(),
            'name'        => $this->getName(),
            'address'     => $this->getAddress(),
            'identifier'  => $this->getIdentifier(),
            'nameMatch'   => $this->getNameMatch(),
            'companyTypeMatch' => $this->getCompanyTypeMatch(),
            'streetMatch' => $this->getStreetMatch(),
            'postcodeMatch' => $this->getPostcodeMatch(),
            'cityMatch' => $this->getCityMatch(),
        ];
    }
1178694
public function toArray(): array
    {
        $data = [
            'meta'     => $this->getMetadata(),
            'links'    => $this->linksToArray(),
            'errors'   => $this->errorsToArray(),
            'included' => $this->includedResourcesToArray()
        ];

        $data = array_filter($data, 'count');

        if ($this->jsonApi !== null) {
            $data['jsonapi'] = $this->jsonApi->toArray();
        }

        return $data;
    }
89646
protected function getRequestData()
    {
        return [
            'request'  => $this->request->toArray(),
            'response' => [
                'content'      => null,
                'content_type' => null,
                'status_code'  => ServiceResponseInterface::HTTP_OK
            ],
            'resource' => $this->resourcePath
        ];
    }
1340824
public function toArray()
    {
        return [
            'field' => $this->getRawProperty('field'),
            'from-field' => $this->getRawProperty('fromField'),
            'to-field' => $this->getRawProperty('toField'),
            'is-deleted' => $this->isDeleted,
            'is-added' => $this->isAdded,
        ];
    }
785487
protected function getSubmittedFormValues()
    {
        $result = [];
        $formName = $this->getFormObject()->getName();
        $originalRequest = $this->getControllerContext()
            ->getRequest()
            ->getOriginalRequest();

        if (null !== $originalRequest
            && $originalRequest->hasArgument($formName)
        ) {
            $result = $originalRequest->getArgument($formName);
        }

        return $result;
    }
451061
public function toRequestParams()
    {
        $ret = array(
            "name" => $this->_name,
            "description" => $this->_description
        );

        foreach ($this->_fields as $column => $fields)
        {
            foreach ($fields as $field)
            {
                if ($field instanceof ObjectField)
                {
                    $ret["fields"][$column][] = $field->toRequestParams();
                }
            }
        }
        // Convert from an assoc array to a numeric array.
        // This will move items from the 3rd column to the 2nd if the 2nd isn't populated.
        $ret["fields"] = array_values($ret["fields"]);
        return $ret;
    }
614618
public function toArray()
    {
        return [
            'name' => $this->name,
            'class-name' => $this->className,
            'path' => $this->path,
            'is-create' => $this->isCreate,
            'is-virtual' => $this->isVirtual,
            'is-organized' => $this->isOrganized,
            'with-soft-delete' => $this->withSoftDelete,
            'without-timestamps' => $this->withoutTimestamps,
            'resource' => ($this->resource ?: new Resource())->toArray(),
        ];
    }
454616
public static function GetRequestParameterList () {
		if ($_SERVER['argc'] < 1) {
			return [];
		}
		$current_key = 0;
		$parameter_list = [];

		$args = array_slice($_SERVER['argv'], 1);
		$argc = count($args);

		for ($i = 0;$i < $argc;$i++) {
			$argv = $args[$i];
			if (substr($argv, 0, 1) === '-') {
				$current_key = substr($argv, 1);
				$parameter_list[$current_key] = '';
				if (isset($args[$i + 1]) && substr($args[$i + 1], 0, 1) !== '-') {
					$parameter_list[$current_key] = $args[$i + 1];
					$i++;
				}
				continue;
			}
			if (isset($parameter_list[$current_key])) {
				if (!is_array($parameter_list[$current_key])) {
					$parameter_list[$current_key] = (array) $parameter_list[$current_key];
				}
				$parameter_list[$current_key][] = $argv;
			} else {
				$parameter_list[$current_key] = $argv;
			}
		}

		return $parameter_list;
	}
1268050
public function toRequestParams()
    {
        $requestParams = array();
        $requestParams["name"] = $this->_name;
        $requestParams["price"] = $this->_price;
        if ($this->_id != null)
        {
            $requestParams["id"] = $this->_id;
        }

        return $requestParams;
    }
1321011
public function toArray()
    {
        return [
            'name' => $this->name,
            'labels' => $this->labelsToRaw($this->getLabels()),
            'html-type' => $this->htmlType,
            'css-class' => $this->cssClass,
            'options' => $this->optionsToRaw($this->getOptions()),
            'html-value' => $this->htmlValue,
            'validation' => implode('|', $this->validationRules),
            'is-on-index' => $this->isOnIndexView,
            'is-on-show' => $this->isOnShowView,
            'is-on-form' => $this->isOnFormView,
            'data-type' => $this->getRawDataType(),
            'data-type-params' => $this->methodParams,
            'data-value' => $this->dataValue,
            'is-index' => $this->isIndex,
            'is-unique' => $this->isUnique,
            'is-primary' => $this->isPrimary,
            'comment' => $this->comment,
            'is-nullable' => $this->isNullable(),
            'is-header' => $this->isHeader,
            'is-unsigned' => $this->isUnsigned,
            'is-auto-increment' => $this->isAutoIncrement,
            'is-inline-options' => $this->isInlineOptions,
            'is-date' => $this->isDate,
            'date-format' => $this->dateFormat,
            'cast-as' => $this->castAs,
            'placeholder' => $this->labelsToRaw($this->getPlaceholders()),
            'delimiter' => $this->optionsDelimiter,
            'range' => $this->range,
            'foreign-relation' => $this->getForeignRelationToRaw(),
            'foreign-constraint' => $this->getForeignConstraintToRaw(),
            'on-store' => $this->onStore,
            'on-update' => $this->onUpdate,
        ];
    }
1174793
public function toArray()
    {
        $data = [$this->_getBaseName() => $this->getParams()];

        if (!empty($this->_rawParams)) {
            $data = \array_merge($data, $this->_rawParams);
        }

        return $this->_convertArrayable($data);
    }
1014181
public function getRequestParameters()
    {
        $aViewVariables = array();

        $aTmp = $this->GetAllInputFieldParameter();
        foreach (array_keys($aTmp) as $sTmpKey) {
            $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];
        }
        $aTmp = $this->GetUserAddressData();
        foreach (array_keys($aTmp) as $sTmpKey) {
            $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];
        }
        $aTmp = $this->GetPaymentTypeSpecifivParameter();
        foreach (array_keys($aTmp) as $sTmpKey) {
            $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];
        }

        return $aViewVariables;
    }
469770
public function toArray(): array
    {
        return array_filter([
            'uuid' => $this->UUID,
            'q' => '' !== $this->getQueryText()
                ? $this->getQueryText()
                : null,
            'fields' => $this->getFields(),
            'coordinate' => $this->coordinate instanceof HttpTransportable
                ? $this->coordinate->toArray()
                : null,
            'filters' => array_filter(
                array_map(function (Filter $filter) {
                    return Filter::TYPE_QUERY !== $filter->getFilterType()
                        ? $filter->toArray()
                        : null;
                }, $this->filters)
            ),
            'universe_filters' => array_filter(
                array_map(function (Filter $filter) {
                    return $filter->toArray();
                }, $this->universeFilters)
            ),
            'aggregations' => array_map(function (Aggregation $aggregation) {
                return $aggregation->toArray();
            }, $this->aggregations),
            'sort' => $this->sortBy instanceof SortBy
                ? $this->sortBy->toArray()
                : null,
            'page' => self::DEFAULT_PAGE === $this->page
                ? null
                : $this->page,
            'size' => self::DEFAULT_SIZE === $this->size
                ? null
                : $this->size,
            'results_enabled' => $this->resultsEnabled
                ? null
                : false,
            'suggestions_enabled' => $this->suggestionsEnabled ?: null,
            'highlight_enabled' => $this->highlightEnabled ?: null,
            'aggregations_enabled' => $this->aggregationsEnabled
                ? null
                : false,
            'searchable_fields' => $this->searchableFields,
            'score_strategies' => $this->scoreStrategies instanceof ScoreStrategies
                ? $this->scoreStrategies->toArray()
                : null,
            'fuzziness' => $this->fuzziness,
            'min_score' => ($this->minScore > self::NO_MIN_SCORE)
                ? $this->minScore
                : null,
            'user' => ($this->user instanceof User)
                ? $this->user->toArray()
                : null,
            'metadata' => $this->metadata,
            'subqueries' => array_map(function (Query $query) {
                return $query->toArray();
            }, $this->subqueries),
            'items_promoted' => array_filter(
                array_map(function (ItemUUID $itemUUID) {
                    return $itemUUID->toArray();
                }, $this->itemsPromoted)
            ),
            'index_uuid' => ($this->indexUUID instanceof IndexUUID)
                ? $this->indexUUID->toArray()
                : null,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }