PHP 8.6.0 Beta 3 is available for testing

Yaf_Dispatcher::getDefaultController

(Yaf >=3.2.0)

Yaf_Dispatcher::getDefaultControllerRetrieve the default controller name

Descrizione

public function Yaf_Dispatcher::getDefaultController(): ?string

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

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

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

Esempi

Example #1 Yaf_Dispatcher::getDefaultController() example

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

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

Il precedente esempio visualizzerà qualcosa simile a:

string(5) "Index"

Vedere anche:

add a note

User Contributed Notes

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