Class

RAMDataStore

Package: IO\Data\store Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Benoit SAUTEL ben.popeye@phpboost.com Version: PHPBoost 5.2 - last update: 2014 12 22 Since: PHPBoost 3.0 - 2011 01 11 Contributor: Loic ROUCHON horn@phpboost.com Located at: io/data/store/RAMDataStore.class.php

This is a very efficient data store, but its principal weakness is that it's life span is very short, in fact it's the page's execution. It's to use when you know that the data you want to store will be accessed several times during the page execution.

RAMDataStore implements DataStore
Methods summary
public mixed
# get( string $id )

Returns the data stored in the $id key.

public boolean
# contains( string $id )

Tells whether the container contains the data at the key $id.

public
# store( string $id, mixed $data )

Stores data.

public
# delete( string $id )

Deletes the data you had stored.

public
# clear( )

Clears all data

Annonces