Yaf_Controller_Abstract::getModuleName
PHP Manual
PHP Manual»Yaf_Controller_Abstract»Yaf_Controller_Abstract::getModuleName

Yaf_Controller_Abstract::getModuleName

(Yaf >=1.0.0)

Yaf_Controller_Abstract::getModuleName — Get module name

Descrizione

public function Yaf_Controller_Abstract::getModuleName(): ?string

Returns the name of the module the controller belongs to.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

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

Esempi

Example #1 Yaf_Controller_Abstract::getModuleName() example

<?php
class IndexController extends Yaf_Controller_Abstract
{
    public function indexAction() {
        // assuming the request was dispatched to the
        // default "Index" module
        var_dump($this->getModuleName());
    }
}
?>

Il precedente esempio visualizzerà qualcosa simile a:

string(5) "Index"

Vedere anche:

To Top