A PHP implementation of the active record pattern