Sanitize POST request-value.
@param string $name name of request-value.
@param mixed $default
@param Sanitize $sanitize
@return mixed
485073
protected function postInternal($name = null, $default = null, Sanitize $sanitize = null)
    {
        return $this->sanitizeValue($this->rawPostInternal($name, $default), $sanitize);
    }
91166
public function sanitize()
    {
        $value = filter_var($this->value, FILTER_SANITIZE_STRING);

        if (false === $value) {
            throw FailedToSanitize::fromValueForClass($this->value, static::class);
        }

        return $value;
    }
719482
public function getParameter($name, $default = NULL)
	{
		if (isset($this->params[$name])) {
			return $this->params[$name];

		} else {
			return $default;
		}
	}
690061
public function input($name, $default = null)
    {
        $value = e($this->value($name, $default));
        $name = e($name);
        return "name=\"$name\" value=\"$value\"";
    }
831937
public function getRequestEscapedParameter($name, $defaultValue = null)
    {
        $value = $this->getRequestParameter($name, $defaultValue);

        // TODO: remove this after special chars concept implementation
        $isAdmin = Registry::getConfig()->isAdmin() && Registry::getSession()->getVariable("blIsAdmin");
        if ($value !== null && !$isAdmin) {
            $this->checkParamSpecialChars($value);
        }

        return $value;
    }
366511
public function getEscapedVar($name, $default = '', $verb = 'get', $options = array())
    {
        //FILTER_SANITIZE_MAGIC_QUOTES
        //FILTER_SANITIZE_SPECIAL_CHARS
        $filter = \IS\ESCAPED; //FILTER_SANITIZE_NUMBER_INT

        $escaped = $this->getVar($name, $filter, $default, $verb, $options);

        //@TODO validate is interger before return
        return $escaped;
    }
485651
public function input($name=null, $default=null)
    {
        if (!$name) {
            return $this->getRequestParams();
        } else {
            $method = $name2 = null;
            $name = str_replace('.', ':', $name);
            if (($pos = strpos($name, ':')) !== false) {
                $names = explode(':', $name);
                $method = strtoupper(trim($names[0]));
                if (in_array($method, ['GET', 'POST', 'OPTION', 'DELETE', 'PUT'])) {
                    $name = trim($names[1]);
                    if (isset($names[2])) {
                        $name2 = trim($names[2]);
                    }
                } else {
                    $method = null;
                    $name = trim($names[0]);
                    $name2 = trim($names[1]);
                }
            } elseif (strtoupper($name) == 'GET' || strtoupper($name) == 'POST') {
                $method = strtoupper($name);
                $name = null;
            }
            
            if ($name === '*') {
                $name = null;
            }
            
            switch ($method) {
                case 'GET':
                    if ($name2) {
                        return isset($this->getQueryParam()[$name][$name2]) ? $this->getQueryParam()[$name][$name2] : $default;
                    } else {
                        return $name ? $this->getQueryParam($name, $default) : $this->getQueryParams();
                    }
                    break;
                case 'POST':
                    if ($name2) {
                        return isset($this->getPostParams()[$name][$name2]) ? $this->getPostParams()[$name][$name2] : $default;
                    } else {
                        return $name ? (isset($this->getPostParams()[$name]) ? $this->getPostParams()[$name] : $default) : $this->getPostParams();
                    }
                    break;
                default:
                    if ($name2) {
                        return isset($this->getRequestParams()[$name][$name2]) ? $this->getRequestParams()[$name][$name2] : $default;
                    } else {
                        return $name ? (isset($this->getRequestParams()[$name]) ? $this->getRequestParams()[$name] : $default) : $this->getRequestParams();
                    }
                    break;
            }
        }
    }
1354799
private function getParam(string $name, string $default = null): ?string
	{
		return $this->request->getPost($name, $default);
	}
1245394
protected function getSubmittedValue($name, $default = null)
    {
        if (empty($this->submittedValues)) {
            $this->setSubmittedValues();
        }
        return array_key_exists($name, $this->submittedValues) ? $this->submittedValues[$name] : $default;
    }
17140
public function getQueryParam($name, $default = null)
    {
        if (isset($this->queryParams[$name])) {
            return $this->queryParams[$name];
        }

        return $default;
    }
454564
public function getPostParameter($name, $raw = false)
    {
        $value = null;
        $post = $this->getPost();

        if (isset($post[$name])) {
            $value = $post[$name];
        }

        if ($value !== null && !$raw) {
            $value = $this->escapeSpecialChars($value);
        }

        return $value;
    }
823011
protected function sanitizeValue($input, Sanitize $sanitize = null)
    {
        if (!isset($sanitize)) {
            $sanitize = $this->sanitize ?: Sanitize::removeTags()->trim()->toType();
        }

        if (is_array($input)) {
            $rawRule = $sanitize->getRawRules();
            $rawRule = current($rawRule);
            if ($rawRule instanceof Attributes) {
                return $sanitize->sanitize($input);
            }
            return Sanitize::attributes($sanitize)->sanitize($input);
        }

        return $sanitize->sanitize($input);
    }
256695
public function getConst($name, $sanitize = null)
    {
        return $this->sanitize(ArrayHelper::getValue(static::$constants, $name), $sanitize);
    }
1023135
public static function getGetParameter(string $name, string $default = null, array $allowed = null): string
    {
        return self::get('GET', $name, $default, $allowed);
    }
103440
public function getPost($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false)
    {
        // perform parent function
        $request = parent::getPost($name, $filters, $defaultValue);

        // special handling for array requests, for individual inputs return what is request
        if (is_array($request) and $this->defaultCaseFormat != false) {
            if ($this->getJsonRawBody() == null) {
                return $this->convertCase($request);
            } else {
                return $this->getJsonRawBody();
            }
        } else {
            return $request;
        }
    }
875138
public function post($name = '', $default = null, $filter = null) {
        $value = $_POST;
        if ($name) {
            $value = $value[ $name ];
        }
        return $this->value($value, $default, $filter);
    }
411010
public function getActionParam($name, $default = null)
    {
        $params = $this->getActionParams();
        return isset($params[$name]) ? $params[$name] : $default;
    }