private static function fromSource($source, $elements, $key, $type = null) {
		if (!isset($elements) || !isset($elements[$key])) {
			return null;
		}

		$type = self::dataTypeOrDefault($type);

		$filtered = \filter_input($source, $key, self::determineFilterMode($type), self::composeFilterFlags($type));

		return self::applyPostProcessing($filtered, $type);
	}
private static function fromSource($source, $elements, $key, $type = null) {
		if (!isset($elements) || !isset($elements[$key])) {
			return null;
		}

		$type = self::dataTypeOrDefault($type);

		$filtered = \filter_input($source, $key, self::determineFilterMode($type), self::composeFilterFlags($type));

		return self::applyPostProcessing($filtered, $type);
	}
private static function fromSource ( $ source , $ elements , $ key , $ type = null ) { if ( ! isset ( $ elements ) || ! isset ( $ elements [ $ key ] ) ) { return null ; } $ type = self :: dataTypeOrDefault ( $ type ) ; $ filtered = \ filter_input ( $ source , $ key , self :: determineFilterMode ( $ type ) , self :: composeFilterFlags ( $ type ) ) ; return self :: applyPostProcessing ( $ filtered , $ type ) ; }
Returns a validated, filtered and typecast value from the given source

@param int $source one of PHP's global constants starting with `INPUT_`
@param array|null $elements the array of input values that belongs to the specified source
@param string $key the name of the element to return from the specified source
@param int|null $type one of the constants from this class starting with `DATA_TYPE_` or `null`
@return mixed|null the validated, filtered and typecast value of the requested data type
Returns a validated filtered and typecast value from the given source