For Developers
Predefined Constants
The K2HASH PHP Extension defines some constants variables.
See here for more information on these constant variables.
K2hash Class
See here for a description of the K2hash class.
The K2hash class provides the methods shown below.
- 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::addSubkey - Associates the key with the other key
- K2hash::addSubkeys - Adds the subkeys to the key
- K2hash::cleanCommonAttribute - Initializes the common attributes
- K2hash::close - Closes the k2h file
- K2hash::create - Creates the k2h file
- K2hash::disableTransaction - Stops a transaction
- K2hash::dumpElementtable - Prints elements of the k2hash’s hash table elements
- K2hash::dumpFull - Prints the k2hash’s hash tables in details
- K2hash::dumpFullKeytable - Prints details of the k2hash’s hash tables
- K2hash::dumpHead - Prints the k2hash’s headers
- K2hash::dumpKeytable - Prints the k2hash’s hash tables
- K2hash::enableTransaction - Starts a transaction
- K2hash::getAttrInfos - Prints the attribute information
- K2hash::getAttrs - Gets attributes of the key
- K2hash::getAttrValue - Gets an attribute value of the attribute key of the key
- K2hash::getAttrVersionInfos - Prints the attribute library version
- K2hash::getIterator - Gets a K2hIterator object
- K2hash::getKeyQueue - Gets a K2hKeyQueue object
- K2hash::getQueue - Gets a K2hQueue object
- K2hash::getStream - Gets a k2hash file stream
- K2hash::getSubkeys - Gets an array of keys associated with the key
- K2hash::getTransactionThreadPool - Gets the number of transaction workers
- K2hash::getValue - Gets the value associated with the key
- K2hash::loadArchive - Loads data from the file
- K2hash::open - Opens the k2h file
- K2hash::openMem - Opens k2hash as volatile(on memory)
- K2hash::openRO - Read the k2hash file
- K2hash::openRW - Edit the k2hash file
- K2hash::openTempfile - Edit the k2hash file on temporary file system
- K2hash::printState - Prints k2hash data statistics
- K2hash::printVersion - Prints the k2hash library version
- K2hash::putArchive - Saves data as the archive file
- K2hash::remove - Removes the key
- K2hash::removeAll - Removes the key and the keys associated with the key
- K2hash::rename - Renames the key
- K2hash::setCommonAttribute - Sets the common attributes
- K2hash::setTransactionThreadPool - Sets the number of transaction workers
- K2hash::setValue - Sets the value associated with the key
- K2hash::transaction - Changes transaction settings
- K2hash::unsetTransactionThreadPool - Stops transaction workers
K2hQueue Class
See here for a description of the K2hQueue class.
The K2hQueue class provides the methods shown below.
- K2hQueue::__construct - Creates a K2hQueue instance
- K2hQueue::count - Counts elements in the K2hQueue object
- K2hQueue::dump - Prints the elements in the K2hQueue object
- K2hQueue::isEmpty - Returns whether the K2hQueue is empty
- K2hQueue::pop - Removes and returns the removed element from the K2hQueue
- K2hQueue::push - Adds a value to the K2hQueue
- K2hQueue::read - Returns a key/value pair from the K2hQueue
- K2hQueue::remove - Removes a value from the K2hQueue
K2hKeyQueue Class
See here for a description of the K2hKeyQueue class.
The K2hKeyQueue class provides the methods shown below.
- K2hKeyQueue::__construct - Creates a K2hKeyQueue instance
- K2hKeyQueue::count - Counts elements in the K2hKeyQueue object
- K2hKeyQueue::dump - Prints the elements in the K2hKeyQueue object
- K2hKeyQueue::isEmpty - Returns whether the K2hKeyQueue is empty
- K2hKeyQueue::pop - Removes and returns the removed element from the K2hKeyQueue
- K2hKeyQueue::push - Adds a key/value pair to the K2hKeyQueue
- K2hKeyQueue::read - Returns a key/value pair from the K2hKeyQueue
- K2hKeyQueue::remove - Removes a key/value pair from the K2hKeyQueue
K2hIterator Class
See here for a description of the K2hIterator class.
The K2hIterator class provides the methods shown below.
- K2hIterator::__construct - Creates a K2hIterator instance
- K2hIterator::current - Gets value of the current K2hIterator item
- K2hIterator::key - Gets key of the current K2hIterator item
- K2hIterator::next - Advances the internal array pointer of k2hash keys
- K2hIterator::rewind - Rewinds the internal array pointer of k2hash keys
- K2hIterator::valid - Returns whether the current K2hIterator item is valid
k2hash Funsctions
See here for a description of the K2hash Functions.
The k2hash provides the functions shown below.
- k2hpx_add_attr_crypt_pass - Adds the password to encrypt values
- k2hpx_add_attr_plugin_library - Adds the user-defined library to handle attributes
- k2hpx_add_attr - Adds the attribute to the key
- k2hpx_add_subkey - Associates the key with the other key
- k2hpx_add_subkeys - Adds the subkeys to the key
- k2hpx_bump_debug_level - Changes the log level
- k2hpx_clean_common_attr - Initializes the common attributes
- k2hpx_close - Closes the k2h file
- k2hpx_create - Creates the k2h file
- k2hpx_da_free - Frees resources of k2hash direct access handle
- k2hpx_da_get_handle_read - Reads data
- k2hpx_da_get_handle_rw - Gets the k2h direct access file handle with read-write only mode
- k2hpx_da_get_handle_write - Gets the k2h direct access file handle with write only mode
- k2hpx_da_get_handle - Gets the k2h direct access file handle
- k2hpx_da_get_length - Gets the data length
- k2hpx_da_get_offset - Gets the k2h direct access file offset with read-write access mode
- k2hpx_da_get_read_offset - Gets the k2h direct access file offset with read access mode
- k2hpx_da_get_value_to_file - Reads value using the offset and write it to the file
- k2hpx_da_get_value - Reads value using the offset
- k2hpx_da_get_write_offset - Gets the k2h direct access file offset with write access mode
- k2hpx_da_set_offset - Sets the offset to modify the data
- k2hpx_da_set_read_offset - Sets the offset to read the data
- k2hpx_da_set_value_from_file - Sets value using the offset reading data from the file with length
- k2hpx_da_set_value - Sets value
- k2hpx_da_set_write_offset - Sets value using the offset
- k2hpx_disable_transaction - Stops a transaction
- k2hpx_dump_elementtable - Prints elements of the k2hash’s hash table elements
- k2hpx_dump_full_keytable - Prints details of the k2hash’s hash tables
- k2hpx_dump_full - Prints the k2hash’s hash tables in details
- k2hpx_dump_head - Prints the k2hash’s headers
- k2hpx_dump_keytable - Prints the k2hash’s hash tables
- k2hpx_enable_transaction - Starts a transaction
- k2hpx_find_first - Gets the k2h file handle to search for the key
- k2hpx_find_free - Releases resources of the k2h file handle to search for keys
- k2hpx_find_get_key - Gets keys using the k2h file handle to search for keys
- k2hpx_find_get_subkeys - Gets keys using the k2h file handle to search for keys with linked with each key
- k2hpx_find_get_value - Gets value using the k2h file handle to search for keys
- k2hpx_find_next - Advances the internal pointer of the k2h file handle to search for keys
- k2hpx_get_attr_value - Gets an attribute value of the key
- k2hpx_get_attrs - Gets attributes of the key
- k2hpx_get_subkeys - Gets the array of the keys(subkeys) linked with the key
- k2hpx_get_transaction_thread_pool - Gets the number of transaction workers
- k2hpx_get_value - Gets the value of the key
- k2hpx_keyq_count - Counts elements in the K2hKeyQueue object
- k2hpx_keyq_dump - Gets the elements in the K2hKeyQueue object
- k2hpx_keyq_empty - Returns whether the K2hKeyQueue is empty
- k2hpx_keyq_free - Frees resources of the K2hKeyQueue handle
- k2hpx_keyq_handle - Gets the K2hKeyQueue file handle
- k2hpx_keyq_pop - Removes and returns the removed element from the K2hKeyQueue
- k2hpx_keyq_push - Adds a key/value pair to the K2hKeyQueue
- k2hpx_keyq_read - Returns a key/value pair from the K2hKeyQueue
- k2hpx_keyq_remove - Removes a key/value pair from the K2hKeyQueue
- k2hpx_load_archive - Loads data from the file
- k2hpx_load_debug_env - Loads environment variables
- k2hpx_load_hash_library - Loads hash functions from the file
- k2hpx_load_transaction_library - Loads functions of k2hash transaction usage from the file
- k2hpx_open_mem - Attaches k2h data segments on memory
- k2hpx_open_ro - Read the k2hash file
- k2hpx_open_rw - Edit the k2hash file
- k2hpx_open_tempfile - Edit the k2hash file on temporary file system
- k2hpx_open - Opens the k2h file
- k2hpx_print_attr_information - Prints the attribute information
- k2hpx_print_attr_version - Prints the attribute library version
- k2hpx_print_state - Prints k2hash data statistics
- k2hpx_print_version - Prints the library version
- k2hpx_put_archive - Saves a k2h file as an archive file
- k2hpx_q_count - Counts elements in the K2hQueue object
- k2hpx_q_dump - Prints the elements in the K2hQueue object
- k2hpx_q_empty - Returns whether the K2hQueue is empty
- k2hpx_q_free - Frees resources of the K2hQueue handle
- k2hpx_q_handle - Gets the K2hQueue file handle
- k2hpx_q_pop - Removes and returns the removed element from the K2hQueue
- k2hpx_q_push - Adds a value to the K2hQueue
- k2hpx_q_read - Returns a key/value pair from the K2hQueue
- k2hpx_q_remove - Removes a value from the K2hQueue
- k2hpx_remove_all - Removes the key and the keys linked with the key
- k2hpx_remove - Removes the key
- k2hpx_rename - Renames the key
- k2hpx_set_common_attr - Sets the common attributes
- k2hpx_set_debug_file - Writes log to the file
- k2hpx_set_debug_level_error - Sets log level to error
- k2hpx_set_debug_level_message - Sets log level to info
- k2hpx_set_debug_level_silent - Stops logging
- k2hpx_set_debug_level_warning - Sets log level to warning
- k2hpx_set_transaction_thread_pool - Sets the number of transaction workers
- k2hpx_set_value - Sets the value
- k2hpx_transaction - Changes transaction settings
- k2hpx_unload_hash_library - Removes the user-defined hash library
- k2hpx_unload_transaction_library - Removes the user-defined transaction library
- k2hpx_unset_debug_file - Writes logs to stderr
- k2hpx_unset_transaction_thread_pool - Stops transaction workers