ORM的PHP像.NET实体框架实体、框架、ORM、PHP

2023-09-03 12:46:47 作者:一人独身闯天涯

我是一个.NET开发者和新的PHP。我想知道,有没有一个ORM的PHP类的实体框架在Microsoft .NET框架?

I'm a .NET developer and new in PHP. I want to know, is there a ORM for PHP like the Entity Framework in the Microsoft .NET Framework?

有没有实用的应用程序,使数据更快,更容易的工作?

Are there any utility applications to make working with data faster and easier?

推荐答案

我建议你看看学说ORM。 主义可以使用YAML,这是类似于使用XML NHibernate的映射生成你的表PHP类的映射。学说还提供命令行工具的基础上修改或者您的架构,模型本身,或者你在抽象的数据库表

I'd recommend you take a look at Doctrine ORM. Doctrine can generate your table to PHP class mappings using YAML, which is similar to NHibernate's mappings using XML. Doctrine also provides command line tools to rebuild aspects of your data layer based on changes to either your schema, the models themselves or the database tables you're abstracting over.

我才真正看了NHibernate的,没有使用过它。所以,我不会声称知道precisely两种的ORM如何接近交叉;我相信通过自己的文档快速浏览会帮助你达到一个更好的结论。

I've only really looked at NHibernate, not used it. So I wouldn't claim to know precisely how well the two ORMs approaches cross-over; I'm sure a quick glance through their documentation would help you reach a better conclusion.