PHP 8.6.0 Beta 3 is available for testing

Yaf_Dispatcher::getInstance

(Yaf >=1.0.0)

Yaf_Dispatcher::getInstanceRetrieve the dispatcher instance

Опис

public static function Yaf_Dispatcher::getInstance(): ?Yaf_Dispatcher

Retrieve the single Yaf_Dispatcher instance.

Параметри

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

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

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

Приклади

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

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

$dispatcher = Yaf_Dispatcher::getInstance();

var_dump($dispatcher === Yaf_Dispatcher::getInstance());
?>

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

bool(true)

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

add a note

User Contributed Notes

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