Tine 2.0 base classes for records and recordSets
From Tine 2.0 - Wiki
In php4 or better with script-style programing paradigms in general , the common data vehicle is an array. Those data arrays are carried arround from function to function. If the arrays become bigger the passing to the functions is often done by reference to save memory. Although arrays are excelent datatypes and one of the major workhorses of php, there are some problems which frequently occour when dealing with arrays as data vehicles.
For the sake of php5, its now possible to consequently write php code with the Object Orientated Programming paradigm. One consequence when writing code with the OOP paradigm is, that the common data vehicle is not an array anymore.
In Tine 2.0 we only use objects as data vehicles. We call the entity of data a record and the collection of many records a record set. A single account, contact, event or email for example is a record whereas a group of accounts, a contact list, a complete calendar or an inbox is a record set.
Single record objects allways have to implement the Tinebase_Record_Interface interface, whereas record sets allways have to be instanceof Tinebase_Record_RecordSet.
To simplify development, there is an abstract implementation of the Tinebase_Record_Interface called Tinebase_Record_Abstract in the Tinebase package which should cover the needs of most applications. The intensions of this class is to decorate the record with methods needed to filter and validate user input.
The RecordSet is the default data Vehicle for sets of data. Its important to realise its task as only being a vehicle having nothing to to with hirachy, grouping or accesscontrol issues. For the relation between records and ACL see Egwbase_Record_Container.