Dutch PHP Conference 2027

Yaf_Request_Abstract::isPost

(Yaf >=1.0.0)

Yaf_Request_Abstract::isPostDetermine if the request is a POST request

Açıklama

public function Yaf_Request_Abstract::isPost(): bool

Checks whether the request was sent with the POST 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 POST, false otherwise.

Örnekler

Örnek 1 Yaf_Request_Abstract::isPost() example

<?php
class LoginController extends Yaf_Controller_Abstract
{
    public function indexAction()
    {
        // Assuming the form was submitted with POST /login
        var_dump($this->getRequest()->isPost());
    }
}
?>

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