A database manager to handle entities in PHP