【文件属性】:
文件名称:harp:Harp ORM 的 PDO 存储
文件大小:140KB
文件格式:ZIP
更新时间:2021-07-09 19:49:30
PHP
竖琴ORM
Harp ORM 是一个用于 php 对象的轻量级 DataMapper 持久层。
快速示例
// Model Class
use Harp \ Harp \ AbstractModel ;
class UserModel extends AbstractModel
{
public static function initialize ( $ config )
{
$ config
-> addRel ( new Rel \ BelongsTo ( 'address' , $ config , Address :: getRepo ()));
}
public $ id ;
public $ name ;
public $ email ;
public $ addressId