|
Veteran Member
Join Date: Feb 2007
Location: Tennessee
|
08-12-2009
, 16:22
Re: FVault - A new vault system!
|
#13
|
Added 3 new functions and updated 2.
New:
PHP Code:
/**
* Sets data of a key permanently (can't be removed with fvault_prune)
*
* @param vaultname Vault name to look in
* @param key Key name to which data will be set
* @param data Data to set to key
* @return Does not return a value.
*/
fvault_pset_data(const vaultname[], const key[], const data[])
PHP Code:
/**
* Prunes the vault for keys that are within the given timestamps
*
* @param vaultname Vault name to look in
* @param start If timestamp is after this Unix Time (set -1 to prune from very start)
* @param end If timestamp is before this Unix Time (set -1 to prune to most time)
* @return Returns number of keys pruned
*/
fvault_prune(const vaultname[], const start=-1, const end=-1)
PHP Code:
/**
* Updates the timestamp on a key located within the vault
*
* @param vaultname Vault name to look in
* @param key Key to update timestamp (if it doesn't exist, a blank value will be set)
* @param timestamp Unix Time to set for the key (-1 for current time)
* @return Returns 2 on new entry, 1 on success, 0 on failure for the key having a permanent timestamp
*/
fvault_touch(const vaultname[], const key[], const timestamp=-1)
Updated:
PHP Code:
/**
* Retrieves data specified by a key
*
* @param vaultname Vault name to look in
* @param key Key name to look for the data
* @param data String which data will be copied to
* @param len Length of data
* @param timestamp The unix time of when the data was last set ( -1 if permanent data, 0 if old fvault version ) ( optional param )
* @return Returns 1 on success, 0 on failue.
*/
fvault_get_data(const vaultname[], const key[], data[], len, ×tamp=0)
- (params didn't change; only difference is it adds the current timestamp)
PHP Code:
/**
* Sets data of a key with current timestamp
*
* @param vaultname Vault name to look in
* @param key Key name to which data will be set
* @param data Data to set to key
* @return Does not return a value.
*/
fvault_set_data(const vaultname[], const key[], const data[])
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw
I love you exolent!
|
|
|
|
|