您好我正在尝试在 Zend 应用程序中设置一些 REST 路由,我想知道如何限制可以访问路由的 HTTP 方法。
$route = new Zend_Controller_Router_Route('user/reset_password', array(
'module' => 'default',
'controller' => 'user',
'action' => 'resetpassword'
));
$front_controller->getRouter()->addRoute('reset_password', $route);
在此路由中,我想指定此路由将响应的 HTTP 动词,如 GET、POST、PUT 等,例如将“method”=>“POST”添加到数组中。
谢谢,