PHP 8.6.0 Beta 3 is available for testing

Yaf_Request_Abstract::isGet

(Yaf >=1.0.0)

Yaf_Request_Abstract::isGetDetermine if the request is a GET request

Опис

public function Yaf_Request_Abstract::isGet(): bool

Checks whether the request was sent with the GET method.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

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

Приклади

Приклад #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());
    }
}
?>

Поданий вище приклад виведе щось схоже на:

bool(true)
bool(false)

Прогляньте також

add a note

User Contributed Notes

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