Function that obtains the data as per the request type.

@return array
776749
public function getData(): array
    {
        $uploads = [];
        //if the user is trying to upload a image
        if ($this->request->hasFiles()) {
            foreach ($this->request->getUploadedFiles() as $file) {
                $uploads[] = [
                    'name' => $file->getKey(),
                    'filename' => $file->getName(),
                    'contents' => file_get_contents($file->getTempName()),
                ];
            }

            $parseUpload = function ($request) use (&$uploads) {
                foreach ($request as $key => $value) {
                    if (is_array($value)) {
                        foreach ($value as $f => $v) {
                            $uploads[] = ['name' => $key . '[' . $f . ']', 'contents' => $v];
                        }
                    } else {
                        $uploads[] = ['name' => $key, 'contents' => $value];
                    }
                }
            };
        }

        switch ($this->request->getMethod()) {
            case 'GET':
                $queryParams = $this->request->getQuery();
                unset($queryParams['_url']);
                return ['query' => $queryParams];
                break;

            case 'POST':
                if (!$uploads) {
                    //if we dont get post send the raw
                    if (count($this->request->getPost()) > 0) {
                        return ['form_params' => $this->request->getPost()];
                    } elseif ($this->request->getJsonRawBody()) {
                        return ['json' => json_decode($this->request->getRawBody(), true)];
                    }
                    //why did we get here?
                    return ['form_params' => $this->request->getPost()];
                } else {
                    $parseUpload($this->request->getPost());
                    return ['multipart' => $uploads];
                }
                break;

            case 'PUT':
                if (!$uploads) {
                    //if we get put send it with the normal put, else send json
                    if (count($this->request->getPut()) > 0) {
                        return ['form_params' => $this->request->getPut()];
                    } elseif ($this->request->getJsonRawBody()) {
                        return ['json' => json_decode($this->request->getRawBody(), true)];
                    }
                    //why did we get here?
                    return ['form_params' => $this->request->getPut()];
                } else {
                    $parseUpload($this->request->getPut());
                    return ['multipart' => $uploads];
                }

                break;
            default:
                return [];
                break;
        }
    }
1104235
public function data()
    {
        return [
            'class' => static::class,
            'params' => [
                'logicalOperator' => $this->logicalOperator,
                'constraints' => $this->constraints->map(function ($constraint) {
                    return $constraint->data();
                })->all(),
            ],
        ];
    }
733156
public function getAll () : array
    {
        return array_map(
            function (string $key)
            {
                return $this->getType($key);
            },
            array_keys($this->types)
        );
    }
628944
public function getRequestHeaders(): array
    {
        $headers = clone $this->headers();

        if (!$headers->headerExists('Content-type')) {
            if ($contentType = $this->getContentType()) {
                if (($charset = $this->getCharset()) && (stripos($contentType, 'charset=') === false)) {
                    $contentType .= "; charset={$charset}";
                }

                $headers->setHeader('Content-type', $contentType);
            }
        }

        return $headers->getHeadersForRequest();
    }
133616
public function getData()
    {
        $result = [
            'type' => $this->type
        ];

        switch($this->type)
        {
            case self::TYPE_POSTBACK:
                $result['title'] = $this->title;
                $result['payload'] = $this->url;
            break;

            case self::TYPE_CALL:
                $result['title'] = $this->title;
                $result['payload'] = $this->url;
            break;

            case self::TYPE_WEB:
              $result['title'] = $this->title;
              $result['url'] = $this->url;

              if ($this->webview_height_ratio) {
                  $result['webview_height_ratio'] = $this->webview_height_ratio;
              }

              if ($this->messenger_extensions){
                  $result['messenger_extensions'] = $this->messenger_extensions;
                  $result['fallback_url'] = $this->fallback_url;
              }
              
              if($this->webview_share_button){
                  $result['webview_share_button'] = $this->webview_share_button ;
              }
            break;

            case self::TYPE_SHARE:
              //only share_contents needed
               if ($this->share_contents)
                $result['share_contents'] = $this->share_contents->getData();
            break;

            case self::TYPE_ACCOUNT_LINK:
                $result['url'] = $this->url;
            break;

            case self::TYPE_ACCOUNT_UNLINK:
              //only type needed
            break;

        }

        return $result;
    }
11935
public function getQueryData(): array
    {
        return \array_merge($this->whereConditions, [
            'limit' => $this->limit,
            'skip' => $this->skip,
            'content_type' => $this->contentType,
            'mimetype_group' => $this->mimeTypeGroup,
            'order' => $this->orderConditions ? \implode(',', $this->orderConditions) : null,
            'select' => $this->select,
            'links_to_entry' => $this->linksToEntry,
            'links_to_asset' => $this->linksToAsset,
        ]);
    }
10480
public function getData()
	{
		$data = $this->data;

		foreach ($data as $key => $value)
		{
			if (is_object($value) and $this->isWhitelisted($value))
			{
				continue;
			}

			if ($this->shouldBeFiltered($key))
			{
				if ($value instanceof Sanitize)
				{
					$data[$key] = $value->sanitize();
				}
				else
				{
					$data[$key] = $this->filter($value);
				}
			}
		}

		return $data;
	}
168018
public function fetchTypes() {
        $response = $this->client->request('GET', 'https://crest-tq.eveonline.com/market/types/');

        return iterator_to_array($this->getOtherPages(json_decode($response->getBody()->getContents())));
    }
638161
public function getData()
    {
        $data   = [];
        $path   = $this->getPath();
        $dir    = new Folder($path);
        $files  = (array) $dir->find('.*\.php');

        if (count($files) > 0) {
            foreach ($files as $file) {
                $name     = FS::filename($file);
                $segments = explode('_', $name);
                $version  = array_shift($segments);
                $class    = Inflector::camelize(implode('_', $segments));

                $data[$version] = [
                    'class' => $class,
                    'path'  => $path . DS . $file
                ];
            }
        }

        return $data;
    }
39868
public function getData()
    {
        $data = [];

        $problems = $this->fetcher->fetch();

        $allowedSeverities = [
            Problem::SEVERITY_CRITICAL,
            Problem::SEVERITY_WARNING,
        ];

        foreach ($problems as $problem) {
            if (!in_array($problem->getSeverity(), $allowedSeverities)) {
                continue;
            }

            $data[] = [
                'id' => strlen($problem->getId()) ? $problem->getId() : md5(serialize($problem)),
                'iconCls' => $problem->getIconClass(),
                'severity' => $problem->getSeverity(),
                'msg' => $problem->getMessage(),
                'hint' => $problem->getHint(),
                'link' => $problem->getLink(),
            ];
        }

        if (!count($data)) {
            $data = false;
        }

        return $data;
    }
1369438
public function getData()
    {
        $data = array();
        foreach (get_object_vars($this) as $key => $value) {
            if (strpos($key, '__') !== 0) {
                $data[$key] = $value;
            }
        }

        return $data;
    }
1078865
protected function collectVisitData()
    {
        $request = $this->request;

        $user = $request->user();
        $userId = $user ? $user->getKey() : null;

        return [
            'user_id'              => $userId,
            'http_referer'         => $request->server('HTTP_REFERER'),
            'url'                  => $request->fullUrl(),
            'request_method'       => $request->method(),
            'request_path'         => $request->getPathInfo(),
            'http_user_agent'      => $request->server('HTTP_USER_AGENT'),
            'http_accept_language' => $request->server('HTTP_ACCEPT_LANGUAGE'),
            'locale'               => $this->app->getLocale(),
            'request_time'         => $request->server('REQUEST_TIME')
        ];
    }
135838
public function getData()
    {
        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'transactionId');

        $data = [
            'AcquirerId'  => $this->getAcquirerId(),
            'MerchantId'  => $this->getMerchantId(),
            'Password'    => $this->getMerchantPassword(),
            'OrderNumber' => $this->getTransactionId()
        ];

        return $data;
    }
370667
public function getDataParams()
    {
        $method = $_SERVER['REQUEST_METHOD'];

        switch ($method) {
            case "POST":
                $this->dataParameters = $this->getPostFromInput();
                break;

            case "PUT":
            case "DELETE":
                $this->dataParameters = $this->getPostFromInput();
                break;
        }
    }
1179354
protected function getData() {
        if ($this->data === null) {
            $stmt = $this->db->get(
                $this->table,
                $this->where,
                $this->options + [Db::OPTION_FETCH_MODE => $this->getFetchArgs()]
            );

            $data = $stmt->fetchAll(...(array)$this->getFetchArgs());

            if (is_callable($this->rowCallback)) {
                array_walk($data, function (&$row) {
                    $row = call_user_func($this->rowCallback, $row);
                });
            }

            $this->data = $data;
        }

        return $this->data;
    }
780127
public function getData()
    {
        $tmp = $this->data;
        foreach (func_get_args() as $arg) {
            if (is_array($tmp) && isset($tmp[$arg])) {
                $tmp = $tmp[$arg];
            } else {
                return '';
            }
        }
        
        return $tmp;
    }
863305
public function getData()
    {
        foreach ($this->data as $value) {
            $this->validateDefinitions($value);
        }
        return ['data' => $this->data, 'parent_aliases' => $this->parentAliases];
    }