K2hash Class K2hash::addAttrCryptPass

K2hash::addAttr

Adds the attribute to the key

Description

public bool K2hash::addAttr ( string $key , string $attrkey , string $attrval )

Adds the attribute to the key. Attributes represent configurations to keep timestamps of data modification, data encryptions or histories.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php

$k2hash = new K2hash();
$k2hash->openMem();
$k2hash->setValue("test", "value");
$k2hash->addAttr("test", "testattr", "testattrvalue");

var_dump($k2hash->getAttrValue("test", "testattr"));
$k2hash->close();
?>

The above example will output:

string(13) "testattrvalue"

See Also

K2hash Class K2hash::addAttrCryptPass