Laravel 4与Data Mapper吗? [英] Laravel 4 with Data Mapper?

查看:87
本文介绍了Laravel 4与Data Mapper吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道Laravel是否具有某种库/插件或调整项以使用Data Mapper或使Active Record表现得像Data Mapper吗?

我不是Laravel用户,所以也许E​​loquent正在使用Active Record和Data Mapper的组合,但我对此并不了解.

解决方案

因此,我们可以使用Doctrine将Data Mapper模式实现到Laravel中.

Packagist: https://packagist.org/packages/atrauzzi/laravel-doctrine

Laravel文档: http://bundles.laravel.com/bundle/doctrine

Does anyone know if Laravel has some sort of library/plugin or tweak to use Data Mapper or to make Active Record behave like Data Mapper?.

I'm not a Laravel user,so perhaps Eloquent is using a mix of Active Record and Data Mapper and I'm not aware of that.

解决方案

So, we can implement the Data Mapper pattern into Laravel using Doctrine;

Packagist: https://packagist.org/packages/atrauzzi/laravel-doctrine

Laravel Doc: http://bundles.laravel.com/bundle/doctrine

这篇关于Laravel 4与Data Mapper吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆