我正在使用Zend开发一个Rest Controller,我对url到Router的映射感到困惑.
基本上我读了Zend路由器,我无法计划我的网址,以满足上述路线.
这些是我应该映射到路由器的一些网址.
http://localhost/api/v1/tags.xml?abc = true (param:abc = true)
http://localhost/api/v1/tags/123456.xml (param:123456.xml)
http://localhost/api/v1/tags/123456/pings.xml (参数:123456,pings.xml)
http://localhost/api/v1/tags/123456/pings.xml?a = 1&b = 2(参数:123456,pings.xml,a = 1,b = 2)
http://localhost/api/v1/tags/123456/pings/count.xml(参数:123456,ping,count.xml)
我正在计划,对于网址模式1到3,"标签"应该是控制器,对于网址模式4到6,"ping"应该是控制器.
现在我不确定如何配置路由器,以便上述方案可行.请注意,我无法更改这些网址.我可以提供100分的良好答案.