more infos about yaf loader

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@329592 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Xinchen Hui 2013-02-28 05:53:22 +00:00
parent 516c1156f4
commit f7975b51dd
2 changed files with 29 additions and 3 deletions

View file

@ -232,7 +232,9 @@ yaf.dispatcher.catchException = 0
</term>
<listitem>
<para>
Introduced in Yaf 2.1.6
Alias of <link
linkend="configuration.yaf.library">application.library</link>. Introduced
in Yaf 2.1.6
</para>
</listitem>
</varlistentry>

View file

@ -11,10 +11,34 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Yaf_Loader::registerLocalNamespace</methodname>
<methodparam choice="opt"><type>mixed</type><parameter>prefix</parameter></methodparam>
<methodparam><type>mixed</type><parameter>prefix</parameter></methodparam>
</methodsynopsis>
<para>
register local class prefix
Register local class prefix name, <classname>Yaf_Loader</classname> search
classes in two library directories, the one is configured via <link
linkend="configuration.yaf.library">application.library.directory</link>(in
application.ini) which is called local libraray directory; the other is
configured via <link linkend="ini.yaf.library">yaf.library</link> (in
php.ini) which is callled global library directory, since it can be shared
by many applications in the same server.
</para>
<para>
When an autloading is trigger, <classname>Yaf_Loader</classname> 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.
<note>
<para>
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.
</para>
</note>
</para>
</refsect1>