Yaf_Request_Abstract::isDelete

Determine if the request is a DELETE request

説明

public bool Yaf_Request_Abstract::isDelete()

Checks whether the request was sent with the DELETE method.

パラメータ

この関数にはパラメータはありません。

戻り値

Returns true if the request method is DELETE, false otherwise.

例

例1 Yaf_Request_Abstract::isDelete example

<?php
class CommentController extends Yaf_Controller_Abstract
{
    public function removeAction()
    {
        // Assuming the request was sent with DELETE /comment/remove/id/12
        var_dump($this->getRequest()->isDelete());
    }
}
?>

上の例の出力は、 たとえば以下のようになります。

bool(true)

参考

  • Yaf_Request_Abstract::isGet
  • Yaf_Request_Abstract::isPost
  • Yaf_Request_Abstract::isPut
  • Yaf_Request_Abstract::isHead
  • Yaf_Request_Abstract::isOptions
  • Yaf_Request_Abstract::isPatch
  • Yaf_Request_Abstract::isCli
  • Yaf_Request_Abstract::isXmlHttpRequest