Returns post data from a submitted form.

@return array
975842
public function getSaveData()
    {
        $this->defineFormFields();

        $result = [];

        /*
         * Source data
         */
        $data = $this->arrayName ? post($this->arrayName) : post();
        if (!$data) {
            $data = [];
        }

        /*
         * Spin over each field and extract the postback value
         */
        foreach ($this->allFields as $field) {
            /*
             * Disabled and hidden should be omitted from data set
             */
            if ($field->disabled || $field->hidden) {
                continue;
            }

            /*
             * Handle HTML array, eg: item[key][another]
             */
            $parts = HtmlHelper::nameToArray($field->fieldName);
            if (($value = $this->dataArrayGet($data, $parts)) !== null) {

                /*
                 * Number fields should be converted to integers
                 */
                if ($field->type === 'number') {
                    $value = !strlen(trim($value)) ? null : (float) $value;
                }

                $this->dataArraySet($result, $parts, $value);
            }
        }

        /*
         * Give widgets an opportunity to process the data.
         */
        foreach ($this->formWidgets as $field => $widget) {
            $parts = HtmlHelper::nameToArray($field);

            $widgetValue = $widget->getSaveValue($this->dataArrayGet($result, $parts));
            $this->dataArraySet($result, $parts, $widgetValue);
        }

        return $result;
    }
404930
protected function getInputData()
    {
        (new HCCountriesValidator())->validateForm();

        $_data = request()->all();

        array_set($data, 'languages', array_get($_data, 'languages'));

        return $data;
    }
1123583
public function get_data() {
        $data = parent::get_data();
        if ($data && $this->hascustomrules) {
            $this->get_module_form()->data_postprocessing($data);
        }
        return $data;
    }
1265766
public function &_getPost() {
        $global = &$_POST;
        $json = file_get_contents('php://input');
        if (empty($global) && !empty($json)) {
            $global = (array)json_decode($json, true);
        }
        return $global;
    }
152974
public function to_postdata() {/*{{{*/
    $total = array();
    foreach ($this->parameters as $k => $v) {
      if (is_array($v)) {
        foreach ($v as $va) {
          $total[] = OAuthUtil::urlencode_rfc3986($k) . "[]=" . OAuthUtil::urlencode_rfc3986($va);
        }
      } else {
        $total[] = OAuthUtil::urlencode_rfc3986($k) . "=" . OAuthUtil::urlencode_rfc3986($v);
      }
    }
    $out = implode("&", $total);
    return $out;
  }
701971
protected function getInputData()
    {
        $_data = request()->all();

        array_set($data, 'record.email', array_get($_data, 'email'));
        array_set($data, 'record.password', array_get($_data, 'password'));
        array_set($data, 'new_password', array_get($_data, 'new_password'));
        array_set($data, 'old_password', array_get($_data, 'old_password'));
        array_set($data, 'roles', array_get($_data, 'roles', []));

        return $data;
    }
1095681
public function getRedirectData()
    {
        // Build the post data as expected by Datatrans.
        $params = $this->getData();
        $getData = array();
        foreach ($params as $key => $value) {
            $getData[$key] = $value;
        }

        return $getData;
    }
803260
public function getData()
    {
        $result = [
            'type' => $this->type,
        ];

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

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

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

            foreach ($this->buttons as $btn) {
                $result['buttons'][] = $btn->getData();
            }
        }

        return $result;
    }
518517
public function getAllPostGet()
    {
        if (isset($this->request->post, $this->request->get)) {
            return array_merge($this->request->get, $this->request->post);
        }
        return $this->request->post ?? $this->request->get ?? [];
    }
154486
public function getData()
    {
        $this->validateParams();

        $result = trim($this->getResult());

        if (substr($result, -2, 2) == '\"') {
            $result = stripslashes($result);
        }

        parse_str($result, $data);

        $sign     = trim($data['sign'], '"');
        $sign     = str_replace(' ', '+', $sign);
        $signType = trim($data['sign_type'], '"');

        $data['sign']      = $sign;
        $data['sign_type'] = $signType;

        return $data;
    }
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;
    }
1243029
private function ParseDataFromPhpInput() {
        if (file_get_contents('php://input') == "") {
            return array();
        }
        $jsonDecodedData = json_decode(file_get_contents('php://input'));
        if (is_null($jsonDecodedData)) {
            return array();
        }
        $postData = get_object_vars($jsonDecodedData);
        if (empty($postData)) {
            return array();
        }
        return $postData;
    }
182326
public function getPostFromInput()
    {
        $ct = $_SERVER['CONTENT_TYPE'];
        $position = stripos($ct, "boundary=");
        $jsonCheck = "application/json";

        $input = file_get_contents("php://input");

        $this->rawData = $input;

        $postVars = array();
        if ($position !== false) {

            $exp = explode("boundary=", $ct);
            if (isset($exp[1])) {
                $boundary = trim($exp[1]);

                $variables = explode("--" . $boundary, $input);

                foreach ($variables as $var) {
                    $var = urldecode($var);
                    if (trim($var) != "" && trim($var) != "--") {
                        preg_match('/Content-Disposition:[ _]*form-data;[ _]*name="([^\"]*)"(.*)/si', $var, $result);
                        $postVars[trim($result[1])] = trim($result[2]);
                    }
                }
            }
        } else if (substr($ct, 0, strlen($jsonCheck)) === $jsonCheck) {
            $postVars = json_decode($input, true);
        } else {
            parse_str($input, $postVars);
        }

        if (count($_POST) > 0 && count($postVars) === 0) {
            $postVars = $_POST;
        }

        return $postVars;
    }
445459
protected function getInputData ()
    {
        (new HCAppsTokensValidator())->validateForm ();

        $_data = request ()->all ();

        $token = array_get ($_data, 'token');

        if (strlen($token) != 255)
            $token = random_str(255);

        array_set ($data, 'record.expires_at', array_get ($_data, 'expires_at'));
        array_set ($data, 'record.token', $token);
        array_set ($data, 'record.app_id', array_get ($_data, 'app_id'));

        return $data;
    }
22263
public function getParsedBody()
    {
        if (!in_array($this->getMethod(), ['GET', 'POST'])) {
            if ($this->getContentType() == 'application/x-www-form-urlencoded') {
                $input_contents = $this->getRawData();
                
                if (function_exists('mb_parse_str')) {
                    mb_parse_str($input_contents, $post_vars);
                } else {
                    parse_str($input_contents, $post_vars);
                }
                if (count($_GET) > 0) {
                    $post_vars = array_merge($post_vars, $_GET);
                }
                return $post_vars;
            } else {
                throw new \UnexpectedValueException('Content-type não aceito');
            }
        } elseif ($this->getMethod() == 'POST') {
            if (count($_GET) > 0) {
                $_POST = array_merge($_POST, $_GET);
            }

            return $_POST;
        } elseif ($this->getMethod() == 'GET') {
            return $_GET;
        }
    }
534921
public function getParams(): array
    {
        $params = $this->getQueryParams();
        $postParams = $this->getParsedBody();

        if ($postParams) {
            $params = array_merge($params, (array)$postParams);
        }

        return $params;
    }
664647
public function getData()
    {
        return [
            self::POSTCODE_ATTR => $this->postcode,
            self::COUNTRY_ATTR => $this->country->getCode(),
        ];
    }