(Yaf >=3.2.0)
Yaf_Dispatcher::getDefaultAction — Retrieve the default action name
Get the default action name, which is used when an action name can not
be extracted from the request URI. Defaults to
"index".
Questa funzione non contiene parametri.
The default action name, or null if the application is not
initialized.
Example #1 Yaf_Dispatcher::getDefaultAction() example
<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");
$dispatcher = Yaf_Dispatcher::getInstance();
var_dump($dispatcher->getDefaultAction());
$dispatcher->setDefaultAction("main");
var_dump($dispatcher->getDefaultAction());
?>Il precedente esempio visualizzerà qualcosa simile a:
string(5) "index" string(4) "main"