Yaf_Dispatcher::getApplication
PHP Manual
PHP Manual»Yaf_Dispatcher»Yaf_Dispatcher::getApplication

Yaf_Dispatcher::getApplication

(Yaf >=1.0.0)

Yaf_Dispatcher::getApplication — Retrieve the application

Açıklama

public function Yaf_Dispatcher::getApplication(): ?Yaf_Application

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

Bağımsız Değişkenler

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

Dönen Değerler

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

Örnekler

Örnek 1 Yaf_Dispatcher::getApplication() example

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

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

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

bool(true)

Ayrıca Bakınız

To Top