svn: /phpdoc/en/trunk/reference/yaf/ yaf-loader.xml

From: Date: Tue, 29 Nov 2011 07:15:43 +0000
Subject: svn: /phpdoc/en/trunk/reference/yaf/ yaf-loader.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9095@lists.php.net to get a copy of this message
laruence Tue, 29 Nov 2011 07:15:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=320141 Log: add the description of yaf.use_spl_autoload Changed paths: U phpdoc/en/trunk/reference/yaf/yaf-loader.xml Modified: phpdoc/en/trunk/reference/yaf/yaf-loader.xml =================================================================== --- phpdoc/en/trunk/reference/yaf/yaf-loader.xml 2011-11-29 06:44:17 UTC (rev 320140) +++ phpdoc/en/trunk/reference/yaf/yaf-loader.xml 2011-11-29 07:15:43 UTC (rev 320141) @@ -20,16 +20,31 @@ <classname>Yaf_Loader</classname> will instance a singleton, and registers itself with spl_autoload. You retrieve an instance using the <methodname>Yaf_Loader::getInstance</methodname> </para> - <para> - By default, <classname>Yaf_Loader</classname> assume all Class will store - in the <link linkend="ini.yaf.library">global class + <classname>Yaf_Loader</classname> attempt to load a class only one shot, if + failed, depend on <link + linkend="ini.yaf.use-spl-autoload">yaf.use_spl_auload</link>, if this + config is On <methodname>Yaf_Loader::autoload</methodname> will return + FALSE, thus give the chance to other autoload function. if it is Off + (by default), <methodname>Yaf_Loader::autoload</methodname> will return + TRUE, and more important is that a very usefull warning will be triggerd + (very usefull to find out why a class could not be loaded). + <note> + <para> + Please keep yaf.use_spl_autoload Off unless there is some library have + their own autoload mechanism and impossible to rewrite it. + </para> + </note> + </para> + <para> + By default, <classname>Yaf_Loader</classname> assume all library (class + defined script) store in the <link linkend="ini.yaf.library">global library directory</link>, which is defined in the php.ini(yaf.library). </para> <para> - If you want <classname>Yaf_Loader</classname> search some Class in the - <link linkend="yaf-loader.props.library">local class + If you want <classname>Yaf_Loader</classname> search some + classes(libraries) in the <link linkend="yaf-loader.props.library">local class directory</link>(which is defined in application.ini, and by default, it is APPLICATION_PATH . "/libraray"), you should register the class prefix using the <methodname>Yaf_Loader::registerLocalNameSpace</methodname>

« previous php.doc.cvs (#9095) next »