(Yaf >=3.0.5)
Yaf_Request_Abstract::isPatch — 判断请求是否为 PATCH 请求
此函数没有参数。
示例 #1 Yaf_Request_Abstract::isPatch() 示例
<?php
class ProfileController extends Yaf_Controller_Abstract
{
public function updateAction()
{
// 假定请求以 PATCH /profile/update 发送
var_dump($this->getRequest()->isPatch());
}
}
?>以上示例的输出类似于:
bool(true)