Yaf_Loader::getNamespaces

Alias of getLocalNamespace

説明

public array Yaf_Loader::getNamespaces()

Alias of Yaf_Loader::getLocalNamespace.

パラメータ

この関数にはパラメータはありません。

戻り値

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

例

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

上の例の出力は、 たとえば以下のようになります。

bool(true)

参考

  • Yaf_Loader::getLocalNamespace