Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
c30a6a59
Commit
c30a6a59
authored
Sep 19, 2014
by
Scott Vivian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update comment for autoloader
parent
426d364f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
qa-base.php
qa-include/qa-base.php
+11
-2
No files found.
qa-include/qa-base.php
View file @
c30a6a59
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment