Home « Server software «
Documentation: shared/values.php
Class Values - Store name-value pairs
This script allows YACS to remember data over time. Any other module may use it freely by calling member functions as described in the following example.For example, to stamp some event you would use:
// remember the date of this event
Values::set($event_id, gmstrftime('%Y-%m-%d %H:%M:%S'));
...
// retrieve the date of this event
$value = Values::get($event_id, NULL_DATE);
This script is a reference file of this system.
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
delete() - Suppress a value
function delete($id)
- $id - string the id of the value to be removed
get() - Retrieve some value by name
function &get($id, $default_value=NULL)
- $id - string the id of the value to be retrieved
- $default_value=NULL - string an optional default value
- returns string cached information, or NULL if the no accurate information is available for this id
set() - Set or change some value
function set($id, $value)
- $id - string the id of this item
- $value - string the related value
setup() - Create table for values
function setup()