Yaf_Request_Abstract::isGet
PHP Manual
PHP Manual»Yaf_Request_Abstract»Yaf_Request_Abstract::isGet

Yaf_Request_Abstract::isGet

(Yaf >=1.0.0)

Yaf_Request_Abstract::isGet — Determine 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

To Top