【发布时间】:2013-08-02 13:15:55
【问题描述】:
我有问题。 Restler 3 中的工作路径如何?
class eventos {
function index($desde=0, $hasta=0) {}
function get($num, $p2='optional') {
if($p2 != 'attend'){}
else{}
}
function post($num, $p2, $request_data = null){
if($p2 == 'comment'){}
if($p2 == 'attend'){}
}
}
我需要:
GET ...public/index.php/eventos/(带2个参数)好的!
POST ...public/index.php/eventos/(4-5个参数)它是如何工作的?
GET ...public/index.php/eventos/{id} 好的!
GET ...public/index.php/eventos/{id}/attend 不行!!!如果 ...eventos/x?p2=attend 可以工作,但我不想要这个,我想要 ...eventos/x/attend
POST ...public/index.php/eventos/{id}/attend (X 参数) ok!
POST ...public/index.php/eventos/{id}/comment(带2个参数)ok!
谢谢!
【问题讨论】: