简体   繁体   中英

Lumen: How to access api from zend framework?

Suppose there is an API developed by Lumen and a legacy code based in Zend framework. Assuming both code bases reside in the same server, how can I make api calls from Zend to Lumen. I hope to find a way like:

// Zend receives request, it does what it should, time to call api
# create lumen app and/or request
$api = whatever;
$request = crate it with proper vars;
# make the call to the specified rout

Besides the fact that it might be viable or not, I want to know if there is any other proper/fast way to do it.

The proper way to go on this problem is through an http call.

You should use a Zend_Http_Client to call the other api done with Lumen, as if it was a third party api.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM