From f7975b51dda9b671b0cc80b5f1aec9c86c8848cd Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Thu, 28 Feb 2013 05:53:22 +0000 Subject: [PATCH] more infos about yaf loader git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329592 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/yaf/appconfig.xml | 4 ++- .../yaf/yaf_loader/registerlocalnamespace.xml | 28 +++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/reference/yaf/appconfig.xml b/reference/yaf/appconfig.xml index 33b9b61d9d..a986ec8101 100644 --- a/reference/yaf/appconfig.xml +++ b/reference/yaf/appconfig.xml @@ -232,7 +232,9 @@ yaf.dispatcher.catchException = 0 - Introduced in Yaf 2.1.6 + Alias of application.library. Introduced + in Yaf 2.1.6 diff --git a/reference/yaf/yaf_loader/registerlocalnamespace.xml b/reference/yaf/yaf_loader/registerlocalnamespace.xml index 5d0a83d914..601430c31c 100644 --- a/reference/yaf/yaf_loader/registerlocalnamespace.xml +++ b/reference/yaf/yaf_loader/registerlocalnamespace.xml @@ -11,10 +11,34 @@ &reftitle.description; public voidYaf_Loader::registerLocalNamespace - mixedprefix + mixedprefix - register local class prefix + Register local class prefix name, Yaf_Loader search + classes in two library directories, the one is configured via application.library.directory(in + application.ini) which is called local libraray directory; the other is + configured via yaf.library (in + php.ini) which is callled global library directory, since it can be shared + by many applications in the same server. + + + When an autloading is trigger, Yaf_Loader will + determine which library directory should be searched in by exame the prefix + name of the missed classname. + + If the prefix name is registered as a localnamespack then look for it in + local library directory, otherwise look for it in global library directory. + + + If yaf.library is not configured, then the global library directory is + assumed to be the local library directory. in that case, all autoloading + will look for local library directory. + + But if you want your Yaf application be strong, then always register your + own classes as local classes. + +