Dutch PHP Conference 2027

Yaf_Request_Abstract::isGet

(Yaf >=1.0.0)

Yaf_Request_Abstract::isGetDetermine if the request is a GET request

Açıklama

public function Yaf_Request_Abstract::isGet(): bool

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

Örnekler

Örnek 1 Yaf_Request_Abstract::isGet() example

<?php
class IndexController extends Yaf_Controller_Abstract
{
    public function indexAction()
    {
        $request = $this->getRequest();

        // Assuming the request was sent with GET /index
        var_dump($request->isGet(), $request->isPost());
    }
}
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)
bool(false)

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top