Entity framework for PHP