如何在使用zf-apigility-doctrine的Apigility应用程序中开始使用Doctrine 2? [英] How to start using Doctrine 2 in an Apigility application with zf-apigility-doctrine?

查看:181
本文介绍了如何在使用zf-apigility-doctrine的Apigility应用程序中开始使用Doctrine 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将教条2 Apigility 驱动 Zend Framework 2 应用程序。

I want to integrate the Doctrine 2 to an Apigility driven Zend Framework 2 application.

所以我安装了 zfcampus / zf-apigility-doctrine

$ composer require zfcampus/zf-apigility-doctrine "~0.3"

并激活模块 Phpro \DoctrineHydrationModule ZF\Apigility\Doctrine\Server ZF\Apigility\Doctrine\Admin 在应用程序配置文件( /config/application.config.php /config/development.config.php )。

and activated the modules Phpro\DoctrineHydrationModule, ZF\Apigility\Doctrine\Server, and ZF\Apigility\Doctrine\Admin in the application config files (/config/application.config.php and /config/development.config.php).

下一步应该在应用程序中开始使用Doctrine一般,特别是在Apigility Admin区域?

推荐答案

我在秋季尝试了这个Apigility扩展,但是在这一点上还远远没有完成。服务器代码是可用的,但没有任何UI集成可以说。您仍然可以通过剖析 zf-apigility-doctrine 的控制器工作方式和 README中提供的信息。其余的大多是试错。当时我使用Chrome的Postman插件将请求发送到README中提到的端点,尝试不同的输入,直到找到有效的方式。从上次尝试以来,它似乎已经在这一部分的整合上取得了很大的进步,但是自从再次尝试以来我没有重新考虑。

I experimented with this Apigility extension in the fall but it was far from complete at that point. The server code was usable but there wasn't any UI integration to speak of. You can still manipulate endpoints by dissecting how zf-apigility-doctrine's controllers work and the information provided in the README. The rest is mostly trial and error. At the time I used the Postman plugin for Chrome to send requests to the endpoints mentioned in the README, trying different inputs until I found something that worked. It looks like they've made good progress on this portion of the integration since I last tried but I haven't revisited since to try again.

似乎没有官方与Apigility管理界面集成。它有一个存储库( https://github.com/zfcampus/zf-apigility- admin-ui ),但快速浏览打开的门票表明它还没有工作。 有人已经打了它,并在其上工作了,但我没有研究我自己,所以我不能评论它的准备状态。

It seems there's no official integration with the Apigility admin UI yet. There is a repository for it (https://github.com/zfcampus/zf-apigility-admin-ui) but a quick browse of the open tickets shows it's not working yet. Someone has forked it and worked on it, but I haven't looked into it myself so I can't comment on it's readiness.

我的建议是,如果你想学习如何将zf-apigility-doctrine整合到你的Apigility最好的方法这样做现在要看看 Roll'n API 来源here

My suggestion is that if you want to learn how to integrate zf-apigility-doctrine into your Apigility the best way to do that right now is to take a look at Roll'n API (source here)

这篇关于如何在使用zf-apigility-doctrine的Apigility应用程序中开始使用Doctrine 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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