PHP 8.6.0 Beta 3 is available for testing

Yaf_Dispatcher::getApplication

(Yaf >=1.0.0)

Yaf_Dispatcher::getApplicationRetrieve the application

Опис

public function Yaf_Dispatcher::getApplication(): ?Yaf_Application

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

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

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

Приклади

Приклад #1 Yaf_Dispatcher::getApplication() example

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

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

Поданий вище приклад виведе щось схоже на:

bool(true)

Прогляньте також

add a note

User Contributed Notes

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