K2hash::getAttrValue
Gets an attribute value of the attribute key of the key
Description
public stringfalseK2hash::getAttrValue ( string $key , string $attrkey )
Gets an attribute value of the attribute key of the key.
Parameters
- key
Specifies the key. - attrkey
Specifies the attribute key.
Return Values
Returns the value of the attribute of the key, otherwise false.
Examples
- Example 1 - Adds an attribute to a key and get it
<?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::addAttr - Adds the attribute to the key
- K2hash::addAttrCryptPass - Adds the password to encrypt values
- K2hash::addAttrPluginLib - Adds the user-defined library to handle attributes
- K2hash::cleanCommonAttribute - Initializes the common attributes
- K2hash::getAttrInfos - Prints the attribute information
- K2hash::getAttrs - Gets attributes of the key
- K2hash::getAttrVersionInfos - Prints the attribute library version