MDB2_DataContainer 2 0.5.3

A persistence layer encapsulates the behaviour needed to make objects persistent. Meaning to load, save and delete objects to and from persistent storage. In this case persistent storage means relational database. Database abstraction is provided by PEAR MDB2.

With MDB2_DataContainer2 and few lines of extra code you can implement Active Record Pattern (An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data).

The class does not use any external configuration files. Extending class itself IS the configuration. All that is needed is to have matching propertyname – columname pairs in the class and the database table.

If the database schema changes, for example the developer adds a column foo to the table, all needed to do is to add a property name foo to the class which extends MDB2_DataContainer2. There is no need to rewrite any internal SQL queries.

Key Features of MDB2_DataContainer2:
- Simple API

Limitations:
- The class does not provide direct support for JOIN:s or table linking. For extreme cases it is still possible to pass hardcoded SQL queries. This usage is discouraged since it breaks the basic idea of using MDB2_DataContainer2.

License type: BSD - BSD License
Date added: 6 years, 3 months 18 days ago | Last updated: 6 years, 3 months 18 days ago

More popular Database Tool

This is actually one of the most advanced image hosting script. The imagetize key features: SEO, Ads Ready, Admin

Listing Files

mdb2_datacontainer
MDB2_DataContainer2-0.5.3
MDB2
DataContainer2
tests
  • 05limit.phpt
  • 1.4 KB
  • 04/08/2008 23:25:46
  • 02overload.phpt
  • 858 Bytes
  • 04/08/2008 23:25:46
  • 11constructor.phpt
  • 949 Bytes
  • 04/08/2008 23:25:46
  • 07where.phpt
  • 779 Bytes
  • 04/08/2008 23:25:46
  • 01setproperties.phpt
  • 870 Bytes
  • 04/08/2008 23:25:46
  • 08delete.phpt
  • 945 Bytes
  • 04/08/2008 23:25:46
  • 12inflector.phpt
  • 1.2 KB
  • 04/08/2008 23:25:46
  • 10errormessages.phpt
  • 1.3 KB
  • 04/08/2008 23:25:46
  • 06order.phpt
  • 811 Bytes
  • 04/08/2008 23:25:46
  • 09hardcoded.phpt
  • 830 Bytes
  • 04/08/2008 23:25:46
Hot Scripts
Sponsors