获取 post/put等设置的body的内容
@param $key
@param string $def
@param null|string $filter
@return null|string
@throws Exception
171107
public function getBody($key, $def = "", $filter = null)
    {
        $val = $this->body[$key];
        if ($filter) {
            $val = Filter::factory($val, $filter);
        }
        return $val === null ? $def : $val;
    }
519018
public function has($key, $filter, $options = null) {
		if (is_string($filter))
			$filter=array($filter);
		if (is_int(strpos($key,'.'))) {
			list($key,$fkey) = explode('.',$key,2);
			if (!isset($this->hasCond[$key.'.']))
				$this->hasCond[$key.'.'] = array();
			$this->hasCond[$key.'.'][$fkey] = array($filter,$options);
		} else {
			if (!isset($this->fieldConf[$key]))
				trigger_error(sprintf(self::E_UNKNOWN_FIELD,$key,get_called_class()),E_USER_ERROR);
			if (!isset($this->fieldConf[$key]['relType']))
				trigger_error(self::E_HAS_COND,E_USER_ERROR);
			$this->hasCond[$key] = array($filter,$options);
		}
		return $this;
	}
981676
function setCurrentFilter(filter) {
    var token = cache.get('token');
    var dfrd = Q.defer();
    var id;
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      id = typeof filter === 'string' ? filter : filter.id;
      request(format(URLs.setCurrentFilter, PROTOCOL, conf.host, id,
        token), function(err, res, body) {
        if (err) {
          dfrd.reject(err);
        } else {
          _extractEmptyResponse(body, dfrd);
          dfrd.resolve(true);
        }
      });
    }
    return dfrd.promise;
  }
335790
public function update(array $data, array $filter = [], array $updateOptions = [])
    {
        // Set statement of bulk object
        $bulk = $this->getBulk();
        $bulk->update($filter, $data, $updateOptions);

        try {
            $response = $this->getInstance()->executeBulkWrite(
                $this->getParam('database') . '.' . $this->getCollection(),
                $bulk,
                $this->getWrite()
            );

        } catch (BulkWriteException $e) {
            new Exception('Unable to write in database');
        }

        return $response ?? false;
    }
1296588
static function get($key, $def = NULL)
	{
		if(array_key_exists($key, $GLOBALS['cms']['config']))
			return  $GLOBALS['cms']['config'][$key];

		return $def;
	}
476484
function applyFilter($element, $filter)
    {
        if (!is_callable($filter)) {
            return self::raiseError(null, QUICKFORM_INVALID_FILTER, null, E_USER_WARNING, "Callback function does not exist in QuickForm::applyFilter()", 'HTML_QuickForm_Error', true);
        }
        if ($element == '__ALL__') {
            $this->_submitValues = $this->_recursiveFilter($filter, $this->_submitValues);
        } else {
            if (!is_array($element)) {
                $element = array($element);
            }
            foreach ($element as $elName) {
                $value = $this->getSubmitValue($elName);
                if (null !== $value) {
                    if (false === strpos($elName, '[')) {
                        $this->_submitValues[$elName] = $this->_recursiveFilter($filter, $value);
                    } else {
                        $idx  = "['" . str_replace(array(']', '['), array('', "']['"), $elName) . "']";
                        eval("\$this->_submitValues{$idx} = \$this->_recursiveFilter(\$filter, \$value);");
                    }
                }
            }
        }
    }
1201545
public function post( $key = null, $default = null ) {
		return func_num_args() === 0 ? $_POST : $this->app->utility->array_get( $_POST, $key, $default );
	}
567914
static function GetData($name, $filter = FILTER_DEFAULT, $options = null)
    {
        return filter_input(INPUT_GET, $name, $filter, $options);
    }
567633
public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->name) && ($filter === null || isset($filter['name']))) {
			$output .= "\x0a";
			$output .= Binary::encodeVarint(strlen($object->name));
			$output .= $object->name;
		}

		if (isset($object->method) && ($filter === null || isset($filter['method']))) {
			foreach ($object->method instanceof \Traversable ? $object->method : (array)$object->method as $k => $v) {
				$output .= "\x12";
				$buffer = MethodDescriptorProtoMeta::toProtobuf($v, $filter === null ? null : $filter['method']);
				$output .= Binary::encodeVarint(strlen($buffer));
				$output .= $buffer;
			}
		}

		if (isset($object->options) && ($filter === null || isset($filter['options']))) {
			$output .= "\x1a";
			$buffer = ServiceOptionsMeta::toProtobuf($object->options, $filter === null ? null : $filter['options']);
			$output .= Binary::encodeVarint(strlen($buffer));
			$output .= $buffer;
		}

		return $output;
	}
334031
public static String addToFilter(String filter, String key, String value)
    {
        if (value != null) 
        {
            String newFilter = "(" + key + "=" + value + ")";
            if ((filter == null) || (filter.length() == 0))
                filter = newFilter;
            else if ((filter.startsWith("(&")) && (filter.endsWith("")))
                filter = filter.substring(0, filter.length() - 1) + newFilter + ")";
            else
                filter = "(&" + filter + newFilter + ")";
        }
        return filter;
    }
1209079
public function Post($Key = NULL, $Default = NULL) {
      if ($Key === NULL)
         return $this->GetRequestArguments (self::INPUT_POST);
      else
         return $this->GetValueFrom(self::INPUT_POST, $Key, $Default);
   }
244136
public function validateRegex(string $key, array $def, $value)
    {
        if (is_scalar($value) && isset($def['regex']) && !empty($value) && !preg_match($def['regex'], $value)) {
            $this->addError($key, 'form.value_not_valid_regex');
        }
    }
173998
public function post($key = null, $default = null, $deep = true)
	{
		if (!empty($key)) {
			return $this->request->request->get($key, $default, $deep);
		} else {
			return $this->request->request->all();
		}
	}
408940
protected function getParameter($key, $type = Validate::TYPE_STRING, array $filter = array(), $title = null, $required = true)
    {
        $parameter = $this->request->getUri()->getParameter($key);

        if (isset($parameter)) {
            return $this->validate->apply($parameter, $type, $filter, $title, $required);
        } else {
            return null;
        }
    }
434030
protected static function getParam($method, $key, $default = NULL) {
        if ($method == 0) {  // POST Method
            if (isset($_REQUEST[$key]) && is_array($_REQUEST[$key])) {
                $param = filter_input($method, $key, FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY);
            } else {
                $param = filter_input($method, $key, FILTER_SANITIZE_STRING, FILTER_REQUIRE_SCALAR);
            }
        } else if ($method == 1) {  // GET Method
            $param = filter_input($method, $key, FILTER_SANITIZE_STRING);
        }

        return $param ? $param : $default;
    }
1317448
public static function post($key=null,$default=null){
    return $key ? (filter_input(INPUT_POST,$key) ?: (is_callable($default)?call_user_func($default):$default)) : $_POST;
  }
337611
public function get($path, $def = null) {
			if ($this->has($path))
				return $this->data[$path];

			return $def;
		}