(PECL yaf >=1.0.0)
Yaf_Loader::registerLocalNamespace — register local class prefix
register local class prefix
prefix
a string or a array of class name prefix. all class prefix with these prefix will be loaded in local library path.
bool
Beispiel #1 Yaf_Loader::registerLocalNamespace()example
<?php
$loader = Yaf_Loader::getInstance('/local/library/', '/global/library');
$loader->registerLocalNamespace("Baidu");
$loader->registerLocalNamespace(array("Sina", "Weibo");
$loader->autoload("Baidu_Name"); // search in '/local/library/'
$loader->autoload("Sina"); // search '/local/library/'
$loader->autoload("Global_Name");// search in '/global/library/'
$loader->autoload("Foo_Bar"); // search in '/global/library/'
?>