K2hdkc::__destruct K2hdkc Class K2hdkc::getValue

K2hdkc::setValue

Sets a key/value pair

Description

    public function setValue(
        string $key,
        string $val,
        bool $clear_subkeys = false,
        array $subkeys = null,
        string $password = null,
        int $expiration_duration = 0): bool {}

Sets a key/value pair.

Parameters

Return Values

Returns true on success or false on failure.

Examples

php -r '
k2hdkc = new K2hdkc("tests/slave.ini");
var_dump($k2hdkc->setValue("key1", "val1"));
var_dump($k2hdkc->getValue("key1"));
unset($k2hdkc);
'

The above example will output:

bool(true)
string(4) "val1"

See Also

K2hdkc::__destruct K2hdkc Class K2hdkc::getValue