PHP 8.6.0 Beta 2 available for testing

Yaf_Request_Abstract::isDelete

(Yaf >=3.0.5)

Yaf_Request_Abstract::isDeleteDetermine if the request is a DELETE request

Açıklama

public function Yaf_Request_Abstract::isDelete(): bool

Checks whether the request was sent with the DELETE method.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

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

Örnekler

Örnek 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());
    }
}
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top