CakePHP 3 - Where is custom datasource?

本秂侑毒 提交于 2019-12-04 04:53:22

问题


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.

My next project also requires a custom DataSource (ArangoDB), so I planned to build it with the new version of CakePHP.

Please do specify where and how to build a DataSource in CakePHP 3.

Thank You.


回答1:


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 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.




回答2:


I was facing the same problem so I decided to write my own models in CakePHP 3.x. If you want you can use it from here. hope you like it.



来源:https://stackoverflow.com/questions/29411494/cakephp-3-where-is-custom-datasource

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!