Set a post field to be send to the server; lookup the value from the key

@param string $key
551964
protected function addPostField($key)
    {
        if (property_exists($this, $key)) {
            $this->postFields[$key] = $this->$key;
        }
    }
153003
public static function setUrlParameter(string $key, $value=null) :void {
		
		// set the value
		self::$_get[$key] = $value;
		
	}
654413
public function setEndpoint($key = 'json')
    {
        $endPoints      = ['xml','json'];
        $this->endpoint = (in_array($key,$endPoints)) ? $key : 'json';
        return $this;
    }
88302
public function hmSet($key, $fields)
    {
        $this->log(__FUNCTION__, $key);
        return $this->persistence->hmSet($key, $fields);
    }
1017233
public function setServer($key, $value = null)
    {
        if (is_array($key)) {
            $this->server = array_merge($this->server, $key);
        } else {
            $this->server[$key] = $value;
        }
    }
1207818
public function set($post_id, string $key, array $values)
    {
        $post_id = (int) ($post_id ?? get_the_ID());

        if (!$post_id || !$key) {
            return; // Not possible.
        }
        $this->unset($post_id, $key);

        $key = $this->key($key);
        foreach ($values as $_value) {
            add_post_meta($post_id, $key, $_value);
        } // unset($_value); // Housekeeping.
    }
700344
public function __isset($key)
    {
        switch (true) {
            case isset($this->_params[$key]):
                return true;
            case isset($_GET[$key]):
                return true;
            case isset($_POST[$key]):
                return true;
            case isset($_COOKIE[$key]):
                return true;
            case isset($_SERVER[$key]):
                return true;
            case isset($_ENV[$key]):
                return true;
            default:
                return false;
        }
    }
106771
public static function post($key = false) {

        if (isset($_POST)) {

            if ($key) {

                return $_POST[$key];
            }

            return $_POST;
        }

        return false;
    }
281318
protected function set_key($key) {
        $bytes = strlen($key); // Get key length in bytes.

        // Only accept keys with the expected (backup::CIPHERKEYLEN) key length. There are a number of hashing,
        // random generators to achieve this esasily, like the one shown below to create the default
        // site encryption key and ivs.
        if ($bytes !== backup::CIPHERKEYLEN) {
            $info = (object)array('expected' => backup::CIPHERKEYLEN, 'found' => $bytes);
            throw new base_element_struct_exception('encrypted_final_element incorrect key length', $info);
        }
        // Everything went ok, store the key.
        $this->key = $key;
    }
886388
public function isPosted($key = null)
    {
        if (isset($key)) {
            $value = $this->request->post($key, null);
            return isset($value);
        }

        return $this->server->requestMethod() === 'POST';
    }
710263
final public static function SetSessionKey( string $key ) : void {
        
        self::SetConfigFromSetter(
                $key,
                self::akSessionKey,
                self::ValidateSessionKey( )
        );
        
    }
910843
function setKey($key) {
		$this->cnxn->confirmTransaction('setKey');
		$currKey = $this->key;
		if (!is_null($currKey) && is_null($key)) {
			$this->cnxn->unregisterStructWithKey($this, $currKey);
		} else if (is_null($currKey) && !is_null($key)) {
			$this->cnxn->registerStructWithKey($this, $key);
		} else if ($currKey != $key) {
			$this->cnxn->unregisterStructWithKey($this, $currKey);
			$this->cnxn->registerStructWithKey($this, $key);
		}
		$this->key = $key;
	}
556370
function copyto($key) {
		$var=&\Base::instance()->ref($key);
		foreach ($this->item as $key=>$field)
			$var[$key]=$field;
	}
434343
public function setId( $key )
	{
		if( $key !== null )
		{
			$this->setCode($key);
			$this->_values['id'] = $this->_values['code'];
			$this->_modified = false;
		}
		else
		{
			$this->_values['id'] = null;
			$this->_modified = true;
		}
	}
605237
protected function fieldValue(string $key)
    {
        return $this->request->input($key)
            ?? $this->request->input("{$this->batchIndex}.{$key}");
    }
194246
public static function post($key,$htmlspecialchars = false){
        if (self::hasPost($key)) {
            if ($htmlspecialchars) {
                return htmlspecialchars($_POST["key"]);
            }else {
                return $_POST["key"];
            }
        }else {
            return null;
        }
    }
67308
protected function setKey($key)
    {
        // If a handler switches key, we need to decrement the counter for the old
        // key, and increment the counter for the new key.
        $this->removeKey();

        // Set the new key, and increment the counter appropriately.
        $this->key = $key;
        if (isset($key)) {
            static::$keys[$key] = isset(static::$keys[$key]) ? static::$keys[$key] + 1 : 1;
        }
    }