Yaf_Dispatcher::getApplication

(Yaf >=1.0.0)

Yaf_Dispatcher::getApplicationRetrieve the application

Description

public function Yaf_Dispatcher::getApplication(): ?Yaf_Application

Retrieve the Yaf_Application instance. Same as Yaf_Application::app().

Parameters

This function has no parameters.

Return Values

The Yaf_Application instance, or null if no application has been initialized yet.

Examples

Example #1 Yaf_Dispatcher::getApplication() example

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

var_dump(Yaf_Dispatcher::getInstance()->getApplication() === Yaf_Application::app());
?>

The above example will output something similar to:

bool(true)

See Also

add a note

User Contributed Notes

There are no user contributed notes for this page.