Obtains a raw value from GET/POST/COOKIE/… and saves it into $this->rawValue

@param int $type INPUT_POST, INPUT_GET, INPUT_COOKIE, INPUT_SERVER, INPUT_ENV, INPUT_REQUEST or INPUT_SESSION
@param string $variableName
425823
public function rawValueFromInput($type, $variableName) {
        $this->clearValidationResult();
        $this->rawValue = null;
        
        if(!$this->getSanitizer()->filterHas($type, $variableName)) {
            return;
        }
        
        if(!$this->unsafeRawSanitizer instanceof \Sanitor\Sanitizer) {
            $this->unsafeRawSanitizer = new \Sanitor\Sanitizer(FILTER_UNSAFE_RAW);
        }
                
        switch($type) {
            case INPUT_COOKIE:
                return $this->setRawValue($this->unsafeRawSanitizer->filterCookie($variableName));
            case INPUT_ENV:
                return $this->setRawValue($this->unsafeRawSanitizer->filterEnv($variableName));
            case INPUT_GET:
                return $this->setRawValue($this->unsafeRawSanitizer->filterGet($variableName));
            case INPUT_POST:
                return $this->setRawValue($this->unsafeRawSanitizer->filterPost($variableName));
            case INPUT_SERVER:
                return $this->setRawValue($this->unsafeRawSanitizer->filterServer($variableName));
            case INPUT_REQUEST:
                return $this->setRawValue($this->unsafeRawSanitizer->filterRequest($variableName));
            case INPUT_SESSION:
                return $this->setRawValue($this->unsafeRawSanitizer->filterSession($variableName));
        }
    }
266494
public function input( $type, $name, $value = null, $options = [] ) {
		$this->type = $type;

		if ( ! isset( $options['name'] ) ) {
			$options['name'] = $name;
		}

		// We will get the appropriate value for the given field. We will look for the
		// value in the session for the value in the old input data then we'll look
		// in the model instance if one is set. Otherwise we will just use empty.
		$id = $this->get_id_attribute( $name, $options );

		if ( ! in_array( $type, $this->skip_value_types ) ) {
			$value = $this->get_value_attribute( $name, $value );
		}

		// Once we have the type, value, and ID we can merge them into the rest of the
		// attributes array so we can convert them into their HTML attribute format
		// when creating the HTML element. Then, we will return the entire input.
		$merge = compact( 'type', 'value', 'id' );

		$options = array_merge( $options, $merge );

		return $this->to_html_string( '<input' . $this->attributes( $options, true ) . '>' );
	}
1133379
public static function getGetOrPostSessionStandardValue($variableName, $standard_value)
    {

        $value = self::getGetPostSession($variableName);

        if (self::getGetPostSession($variableName) !== null) {
            $_SESSION[$variableName] = $standard_value;

            $value = $standard_value;
        }
        
        return $value;
    }
107457
private function getVariableType(string $type): string
    {
        if (!$this->isSimpleType($type)) {
            $type = '\DataProvider\\' . $type . 'DataProvider';
        }

        if ($type === 'DataProviderInterface') {
            $type = '\\' . DataProviderInterface::class;
        }

        if ($type === 'DataProviderInterface[]') {
            $type = '\\' . DataProviderInterface::class . '[]';
        }

        if (strpos($type, '[]') !== false) {
            $type = str_replace('[]', '', $type) . '[]';
        }

        return $type;
    }
1308208
public function unsafePost($varname, $default = false)
	{
		if(isset($this->postvars[$varname])) {
			return $this->postvars[$varname];
		} else {
			return $default;
		}
	}
813462
public function setCookie($varname, $varval)
    {
        $this->alteredcookies = true;
        $this->cookievars[$varname] = $varval;
    }
393950
protected function sessionPut($var, $value)
    {
        if ($this->stateless) {
            return $value;
        }

        $this->getRequest()->session()->put(
            $this->makeSessionVarName($var),
            $value
        );

        return $value;
    }
388738
public function bindParam($parameter, &$variable, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null) {
		$this->boundValues[$parameter] = $variable;
		return parent::bindParam($parameter, $variable, $data_type, $length, $driver_options);
	}
637269
protected Response responseForByteVariable(TypedValue variableInstance) {
    byte[] valueBytes = (byte[]) variableInstance.getValue();
    if (valueBytes == null) {
      valueBytes = new byte[0];
    }
    return Response.ok(new ByteArrayInputStream(valueBytes), MediaType.APPLICATION_OCTET_STREAM).build();
  }
1198930
public function getPost(string $name, string $type = null, $default = null)
    {
        $value = $this->getUserData($this->post, $name);

        if ($type) {
            $value = $this->validateType($value, $type, $default);
        }

        return $value;
    }
1373044
public static function serverVariable( $variableName, $quiet = false )
    {
        if ( !isset( $_SERVER[$variableName] ) )
        {
            if ( !$quiet )
            {
                eZDebug::writeError( "Server variable '$variableName' does not exist", __METHOD__ );
            }

            return null;
        }
        return $_SERVER[$variableName];
    }
21554
public void save(HttpServletRequest req, HttpServletResponse res, AuthenticationResult authResult, boolean keepInput) {
		if (!req.getMethod().equalsIgnoreCase("POST")) {
			return;
		}

		if (!(req instanceof IExtendedRequest)) {
			if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
				Tr.debug(tc, "It is not an IExtendedRequest object");
			}
			return;
		}
		restorePostParams((SRTServletRequest) req);

		String reqURL = req.getRequestURI();
		try {
			String postParamSaveMethod = webAppSecurityConfig.getPostParamSaveMethod();
			if (postParamSaveMethod.equalsIgnoreCase(WebAppSecurityConfig.POST_PARAM_SAVE_TO_COOKIE)) {
				saveToCookie((IExtendedRequest) req, reqURL, authResult, keepInput);
			} else if (postParamSaveMethod.equalsIgnoreCase(WebAppSecurityConfig.POST_PARAM_SAVE_TO_SESSION)) {
				IExtendedRequest extRequest = (IExtendedRequest) req;
				Map params = extRequest.getInputStreamData();
				saveToSession(req, reqURL, params);
			}
		} catch (IOException exc) {
			if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
				Tr.debug(tc, "IO Exception storing POST parameters onto a cookie or session: ", new Object[] { exc });
			}
		}
	}
1151376
public static function get($variable, $raw = false) {
		// If it exists, and we do not want to overwrite, then throw exception
		if (! self::has($variable)) {
			throw new \Polyfony\Exception("{$variable} does not exist in the store.");
		}

		return $raw ? $_COOKIE[$variable] : json_decode(gzuncompress($_COOKIE[$variable]));

	}
1100265
public function getTempVariableForObserve($type, CompilationContext $context)
    {
        $variable = $this->reuseTempVariable($type, 'observe');
        if (\is_object($variable)) {
            $variable->increaseUses();
            $variable->increaseMutates();
            $variable->observeVariant($context);

            return $variable;
        }

        $tempVar = $this->getNextTempVar();
        $variable = $this->addVariable($type, '_'.$tempVar, $context);
        $variable->setIsInitialized(true, $context);
        $variable->setTemporal(true);
        $variable->increaseUses();
        $variable->increaseMutates();
        $variable->observeVariant($context);

        $this->registerTempVariable($type, 'observe', $variable);

        return $variable;
    }
1174908
public Object resolveVariable(String pName,
                                  Object pContext)
            throws ELException {
        PageContext ctx = (PageContext) pContext;

        // Check for implicit objects
        if ("pageContext".equals(pName)) {
            return ctx;
        } else if ("pageScope".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getPageScopeMap();
        } else if ("requestScope".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getRequestScopeMap();
        } else if ("sessionScope".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getSessionScopeMap();
        } else if ("applicationScope".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getApplicationScopeMap();
        } else if ("param".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getParamMap();
        } else if ("paramValues".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getParamsMap();
        } else if ("header".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getHeaderMap();
        } else if ("headerValues".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getHeadersMap();
        } else if ("initParam".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getInitParamMap();
        } else if ("cookie".equals(pName)) {
            return ImplicitObjects.
                    getImplicitObjects(ctx).
                    getCookieMap();
        }

        // Otherwise, just look it up in the page context
        else {
            return ctx.findAttribute(pName);
        }
    }
1059480
public static function getGetPost($variableName)
    {

        $value = null;

        if (isset($_GET[$variableName])) {
            $value = $_GET[$variableName];
        }

        if (isset($_POST[$variableName])) {
            $value = $_POST[$variableName];
        }

        $value = self::stripSlashesDeep($value);

        return $value;
    }
1045912
protected function _initValue($value = null, $type = self::T_TEXT)
    {
        switch ($type) {
            case self::T_TEXT:
                $this->rawValue = $value;
                break;
            case self::T_RAW:
                $this->value = $value;
                break;
        }
    }