Commit c30a6a59 by Scott Vivian

Update comment for autoloader

parent 426d364f
...@@ -29,8 +29,17 @@ ...@@ -29,8 +29,17 @@
define('QA_BUILD_DATE', '2014-03-20'); define('QA_BUILD_DATE', '2014-03-20');
// Autoloader for Q2A classes /*
* Autoloads some Q2A classes so it's possible to use them without adding a require_once first. From version 1.7 onwards.
* These loosely follow PHP-FIG's PSR-0 standard where faux namespaces are separated by underscores. This is being done
* slowly and carefully to maintain backwards compatibility, and does not apply to plugins, themes, nor most of the core
* for that matter.
*
* Classes are stored in the qa-include/Q2A folder, and then in subfolders depending on their categorization.
* Class names should be of the form Q2A_<Namespace>_<Class>, e.g. Q2A_Util_Debug. There may be multiple "namespaces".
* Classes are mapped to PHP files with the underscores converted to directory separators. The Q2A_Util_Debug class is in
* the file qa-include/Q2A/Util/Debug.php. A class named Q2A_Db_User_Messages would be in a file qa-include/Q2A/Db/User/Messages.php.
*/
function qa_autoload($class) function qa_autoload($class)
{ {
if (strpos($class, 'Q2A_') === 0) if (strpos($class, 'Q2A_') === 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment