PHP 8.6.0 Beta 3 is available for testing

Yaf_Controller_Abstract::getRequest

(Yaf >=1.0.0)

Yaf_Controller_Abstract::getRequestRetrieve current request object

Açıklama

public function Yaf_Controller_Abstract::getRequest(): ?Yaf_Request_Abstract

Returns the Yaf_Request_Abstract instance associated with this controller.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

A Yaf_Request_Abstract instance, or null if no request is available.

Örnekler

Örnek 1 Yaf_Controller_Abstract::getRequest() example

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

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

string(5) "Index"
string(5) "Index"
string(5) "index"

Ayrıca Bakınız

add a note

User Contributed Notes

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