Yaf_Request_Abstract::isDelete
PHP Manual
PHP Manual»Yaf_Request_Abstract»Yaf_Request_Abstract::isDelete

Yaf_Request_Abstract::isDelete

(Yaf >=3.0.5)

Yaf_Request_Abstract::isDelete — Determine if the request is a DELETE request

Descrição

public function Yaf_Request_Abstract::isDelete(): bool

Checks whether the request was sent with the DELETE method.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

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

Examples

Exemplo #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());
    }
}
?>

O exemplo acima produzirá algo semelhante a:

bool(true)

Veja também

To Top