PHP 8.4.26 Released!

Yaf_Dispatcher::getDefaultController

(Yaf >=3.2.0)

Yaf_Dispatcher::getDefaultController — Retrieve the default controller name

Beschreibung

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

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

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

Beispiele

Beispiel #1 Yaf_Dispatcher::getDefaultController() example

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

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

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

string(5) "Index"

Siehe auch

+add a note

User Contributed Notes

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