问题描述
我有大量的 CakePHP 2 Web 应用程序,其中许多通过自定义数据源使用远程数据.我正在阅读 CakePHP 3 的文档,但找不到创建自定义日期源的说明.
I have a large number of CakePHP 2 web applications, many of them use remote data over the custom DataSource. I'm reading the documentation of CakePHP 3, but I can not find instructions for creating custom datesource.
我的下一个项目也需要一个自定义的数据源 (ArangoDB),所以我打算用新版本的 CakePHP 来构建它.
My next project also requires a custom DataSource (ArangoDB), so I planned to build it with the new version of CakePHP.
请务必指定在 CakePHP 3 中构建数据源的位置和方式.
Please do specify where and how to build a DataSource in CakePHP 3.
谢谢.
推荐答案
只需查看任何现有数据库驱动程序的代码,看看它是如何构建的?书中还没有关于如何创建自己的数据源的内容.
Just look at the code of any existing database driver and see how it is built? There is nothing in the book yet about how to create your own datasource.
ArangoDB 似乎是另一个 NoSQL DB,所以看看这个 Elastic Search 数据源是如何实现的 完成了.快速浏览一下,我认为您可以将其用作实现的基础,它们似乎很相似.
ArangoDB seems to be yet another NoSQL DB, so take a look at how this Elastic Search datasource is done. By a quick look I think you can use it as a base for your implemention, they seem to be similar.
这篇关于CakePHP 3 - 自定义数据源在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!