Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Request_Abstract::isOptionsYaf_Request_Abstract::isPost>
^Yaf_Request_AbstractLast updated: Mon, 26 Oct 2026

Yaf_Request_Abstract::isPatch

(Yaf >=3.0.5)

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

Description

public function Yaf_Request_Abstract::isPatch(): bool

Checks whether the request was sent with the PATCH method.

Parameters

This function has no parameters.

Return Values

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

Examples

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

The above example will output something similar to:

bool(true)

See Also


<Yaf_Request_Abstract::isOptionsYaf_Request_Abstract::isPost>
^Yaf_Request_AbstractLast updated: Mon, 26 Oct 2026