PHP 8.6.0 Beta 2 available for testing

Yaf_Request_Abstract::isPatch

(Yaf >=3.0.5)

Yaf_Request_Abstract::isPatchDetermine 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