PHP 8.6.0 Beta 3 is available for testing

Yaf_Loader::getNamespaces

(Yaf >=3.2.0)

Yaf_Loader::getNamespacesAlias of getLocalNamespace

Açıklama

public function Yaf_Loader::getNamespaces(): array

Alias of Yaf_Loader::getLocalNamespace().

Bağımsız Değişkenler

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

Dönen Değerler

An array of the registered local namespaces, keyed by the namespace prefix, or an empty array if none are registered.

Örnekler

Örnek 1 Yaf_Loader::getNamespaces() example

<?php
$app    = new Yaf_Application(__DIR__ . "/conf/application.ini");
$loader = Yaf_Loader::getInstance();
$loader->registerLocalNamespace(array("Models", "Services"));

/* getNamespaces() is an alias of getLocalNamespace() */
var_dump($loader->getNamespaces() === $loader->getLocalNamespace());
?>

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

bool(true)

Ayrıca Bakınız

add a note

User Contributed Notes

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