Login   Register  
PHP Classes

Persistent Array: Access flat file databases like arrays

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Cesar D. Rodas
Name: Cesar D. Rodas is available for providing paid consulting. Contact Cesar D. Rodas .
Classes: 37 packages by
Country: Paraguay Paraguay
Age: 26
All time rank: 71 in Paraguay Paraguay
Week rank: 25 Down1 in Paraguay Paraguay Equal
Innovation award
Innovation award
Nominee: 24x

Winner: 5x

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to access flat file databases like arrays.

The class extends the SPL ArrayObject class to be able to retrieve, add, update and delete entries in flat file database files using the DBM extension.

It also provides an iterator class to be able to traverse the entries in a DBM file using the regular array access functions.

  Classes of Cesar D. Rodas  >  Persistent Array  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Persistent Array
Base name: parray
Description: Access flat file databases like arrays
Version: 1.0
PHP version: 5.0
License: BSD License
All time users: 833 users
All time rank: 3807
Week users: 0 users
Week rank: 1485 Equal
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Databases Database management, accessing and searching View top rated classes
Group folder image Data types Modeling and manipulating data types View top rated classes

  Innovation Award  
PHP Programming Innovation award nominee
March 2008
Number 6

Prize: One subscription to the PDF edition of the magazine by PHP Architect
Arrays are a very popular data type used in PHP to store a variable number of information items.

If you want to store information of arrays in a file or database so you can retrieve later, you can serialize the array and store it as a single data chunk.

However, that is not a very efficient solution. If the array is large, it may take too much time to store and retrieve changes or look up for elements.

This package takes advantage of the PHP 5 array iterator objects and implements a wrapper that stores and retrieve array elements in a flat file database managed by the DBM API.

This way the array can be stored persistently in files and its elements can be accessed very quickly.

Manuel Lemos

  User ratings  
Not enough user ratings

  Applications that use this package  
No pages of applications that use this class were specified.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file parray.php Class Main class
Accessible without login Plain text file test.php Test Testing

Install with Composer Install with Composer - Download Download all files: parray.tar.gz parray.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.