K2hash::getAttrs
Gets attributes of the key
Description
public arrayfalseK2hash::getAttrs ( string $key )
Gets attributes of the key.
Parameters
- key
Specifies the key.
Return Values
Returns attributes of the key, otherwise false.
Examples
- Example 1 - Get attributes of a key
<?php
$k2hash = new K2hash();
$k2hash->openMem();
$k2hash->setValue("test", "value");
$k2hash->addAttr("test", "testattr", "testattrvalue");
var_dump($k2hash->getAttrs("test"));
$k2hash->close();
?>
The above example will output:
array(1) {
[0]=>
string(8) "testattr"
}
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::getAttrValue - Gets an attribute value of the attribute key of the key
- K2hash::getAttrVersionInfos - Prints the attribute library version