Yaf_Controller_Abstract::getName
PHP Manual
PHP Manual»Yaf_Controller_Abstract»Yaf_Controller_Abstract::getName

Yaf_Controller_Abstract::getName

(Yaf >=3.2.0)

Yaf_Controller_Abstract::getName — Get controller name

Açıklama

public function Yaf_Controller_Abstract::getName(): ?string

Returns the name of the controller.

Bağımsız Değişkenler

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

Dönen Değerler

The controller name as a string, or null if it is not set.

Örnekler

Örnek 1 Yaf_Controller_Abstract::getName() example

<?php
class ProductController extends Yaf_Controller_Abstract
{
    public function indexAction() {
        // the controller name, without the "Controller" suffix
        var_dump($this->getName());
    }
}
?>

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

string(7) "Product"

Ayrıca Bakınız

To Top