PHP 8.6.0 Beta 3 is available for testing

Yaf_Dispatcher::getDefaultModule

(Yaf >=3.2.0)

Yaf_Dispatcher::getDefaultModuleRetrieve the default module name

Опис

public function Yaf_Dispatcher::getDefaultModule(): ?string

Get the default module name, which is used when a module name can not be extracted from the request URI. Defaults to "Index".

Параметри

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

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

The default module name, or null if the application is not initialized.

Приклади

Приклад #1 Yaf_Dispatcher::getDefaultModule() example

<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");

var_dump(Yaf_Dispatcher::getInstance()->getDefaultModule());
?>

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

string(5) "Index"

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

add a note

User Contributed Notes

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