PHP 8.6.0 Beta 3 is available for testing

Yaf_Request_Abstract::getActionName

(Yaf >=1.0.0)

Yaf_Request_Abstract::getActionNameRetrieve the action name

Açıklama

public function Yaf_Request_Abstract::getActionName(): ?string

Retrieve the action name

Bağımsız Değişkenler

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

Dönen Değerler

The action name, or null if not set.

Örnekler

Örnek 1 Yaf_Request_Abstract::getActionName() example

<?php
class ProductController extends Yaf_Controller_Abstract
{
    public function viewAction()
    {
        // Assuming the request is /product/view/id/17
        var_dump($this->getRequest()->getActionName());
    }
}
?>

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

string(4) "view"

Ayrıca Bakınız

add a note

User Contributed Notes

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