Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Dispatcher::getDefaultControllerYaf_Dispatcher::getInstance>
^Yaf_DispatcherLast updated: Mon, 26 Oct 2026

Yaf_Dispatcher::getDefaultModule

(Yaf >=3.2.0)

Yaf_Dispatcher::getDefaultModule — Retrieve the default module name

Description

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".

Parameters

This function has no parameters.

Return Values

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

Examples

Example #1 Yaf_Dispatcher::getDefaultModule() example

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

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

The above example will output something similar to:

string(5) "Index"

See Also


<Yaf_Dispatcher::getDefaultControllerYaf_Dispatcher::getInstance>
^Yaf_DispatcherLast updated: Mon, 26 Oct 2026