(Yaf >=1.0.0)
Yaf_Loader::getLocalNamespace — Retrieve registered namespaces
Retrieve all registered local namespaces and their paths.
Diese Funktion besitzt keine Parameter.
An array of the registered local namespaces, keyed by the namespace prefix, or an empty array if none are registered.
Beispiel #1 Yaf_Loader::getLocalNamespace() example
<?php
$app = new Yaf_Application(__DIR__ . "/conf/application.ini");
$loader = Yaf_Loader::getInstance();
$loader->registerLocalNamespace("Models");
$loader->registerLocalNamespace("Vendor", APPLICATION_PATH . "/library/Vendor");
print_r($loader->getLocalNamespace());
?>Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
Array
(
[Models] => /var/www/shop/application/library
[Vendor] => /var/www/shop/application/library/Vendor
)