A generic model layer for PHP