Yaf_Request_Abstract::isPatch
PHP Manual
PHP Manual»Yaf_Request_Abstract»Yaf_Request_Abstract::isPatch

Yaf_Request_Abstract::isPatch

(Yaf >=3.0.5)

Yaf_Request_Abstract::isPatch — Determine if the request is a PATCH request

Опис

public function Yaf_Request_Abstract::isPatch(): bool

Checks whether the request was sent with the PATCH method.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

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

Приклади

Приклад #1 Yaf_Request_Abstract::isPatch() example

<?php
class ProfileController extends Yaf_Controller_Abstract
{
    public function updateAction()
    {
        // Assuming the request was sent with PATCH /profile/update
        var_dump($this->getRequest()->isPatch());
    }
}
?>

Поданий вище приклад виведе щось схоже на:

bool(true)

Прогляньте також

To Top