Yaf_Dispatcher::getInstance
PHP Manual
PHP Manual»Yaf_Dispatcher»Yaf_Dispatcher::getInstance

Yaf_Dispatcher::getInstance

(Yaf >=1.0.0)

Yaf_Dispatcher::getInstance — Retrieve the dispatcher instance

Açıklama

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

Retrieve the single Yaf_Dispatcher instance.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

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

Örnekler

Örnek 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());
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)

Ayrıca Bakınız

To Top