Description... (code attached to post)

PHP Code

/*///////////////////////////////////////////////////////////////////////////////////////


Purpose
-------
Provides a serializable/deserializable associative array containing additional
database-like features.


Description
-----------
Class Name: clsrtCDPJr
Author: Russ Tanner
E-Mail: russ@russtanner.com


Function List
-------------
Legend: <blank>=Unwritten, @=Currently Coding, !=Needs Testing, .=Done (Tested), r=Rewrite, ?=Review

Public Interface
.	Append - Appends a new record to the end of the database.
.	Data - Sets or retrieves a record's data.
.	Debug_GetAll - Returns a string that contains the entire contents of the CDP.
.	Debug_SayAll - Displays the entire contents of the CDP on STDOUT
.	Debug_SayString - Used to display details about each character in a string.
.	Delete - Deletes a specified record from the database.
.	DeleteAll - Deletes all records in the database.
.	DeleteRecord - Deletes a specified record from the database.
.	Deserialize - Converts a BLOB containing a serialized database into a usable database.
.	FindData - Used to get the record number of a record containing specified data.
.	FindKey - Used to get the record number of a record containing a specified key.
.	RecordData - Sets or retrieves the data for a specified record (specified by record number).
.	RecordKey - Sets or retrieves the key for a specified record (specified by record number).
.	Serialize - Returns the entire database as a string (binary large object - BLOB).
.	SerializeSize - Used to determine the exact byte-size of the entire database when serialized.

Private Services
.	_appendRecord - Used to append a new record to the database.
.	_asInteger_String_ASCII - Used to convert a string to a integer.
.	_deleteRecordByIndex - Deletes a specified record from the database.
.	_editRecordByIndex - Used to edit the key and data of a specified record.
.	_indexOfData - Used to determine the index of the first record containing specified data.
.	_indexOfKey - Used to determine the index of the first record containing a specified key.
.	_isDatabaseFull - Used to determine if the database contains the maximum number of records allowed.
.	_isValidIndex - Used to determine if a specified index is valid.
.	_trimData - Returns specified data trimmed to the maximum allowed length.
.	_trimKey - Returns a specified key trimmed to the maximum allowed length.


Version History
---------------
1.0	6/30/2004 Tested by Russ Tanner


*////////////////////////////////////////////////////////////////////////////////////////
 

Attachments
clsrtCDPJr.txt (41.03 KB, 209 downloads)

The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)