Yaf_Loader::getNamespacePath
(Yaf >=3.2.0)
Yaf_Loader::getNamespacePath — Retieve path of a registered namespace
说明
public Yaf_Loader::getNamespacePath(string
$namespaces
): stringretrieve path of a registered namespace
参数
-
namespace
-
a string of namespace.
返回值
string path, if the namespace is not registered, then null
default library will be returned
范例
示例 #1 Yaf_Loader::registerNamespace()example
<?php
$loader = Yaf_Loader::getInstance("/var/application/lib");
$loader->registerNamespace("\Vendor\PHP", "/var/lib/php");
$loader->getNamespacePath("\Vendor\PHP"); // '/var/lib/php'
$loader->getNamespacePath("\Vendor\JSP"); // '/var/application/lib'
?>

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/yaf-loader.getnamespacepath.php