-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauto_load.php
61 lines (58 loc) · 2.32 KB
/
auto_load.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
spl_autoload_register("myAutoLoad");
function myAutoLoad($classname)
{
$classpath = getClassPath();
if (isset($classpath[$classname]))
{
include($classpath[$classname]);
}
}
function getClassPath()
{
static $classpath=array();
if (!empty($classpath)) return $classpath;
if(function_exists("apc_fetch"))
{
$classpath = apc_fetch("sogou:case:genautoload:1394165993");
if ($classpath) return $classpath;
$classpath = getClassMapDef();
apc_store("sogou:case:genautoload:1394165993",$classpath);
}
else if(function_exists("eaccelerator_get"))
{
$classpath = eaccelerator_get("sogou:case:genautoload:1394165993");
if ($classpath) return $classpath;
$classpath = getClassMapDef();
eaccelerator_put("sogou:case:genautoload:1394165993",$classpath);
}
else
{
$classpath = getClassMapDef();
}
return $classpath;
}
function getClassMapDef()
{
return array(
"TodoController" => "/search/nginx/html/MyFrame/src/controller/TodoController.php",
"VoteController" => "/search/nginx/html/MyFrame/src/controller/VoteController.php",
"BaseDao" => "/search/nginx/html/MyFrame/src/dao/BaseDao.php",
"TodoDao" => "/search/nginx/html/MyFrame/src/dao/TodoDao.php",
"ErrorInfo" => "/search/nginx/html/MyFrame/src/dictionary/ErrorInfo.php",
"AppController" => "/search/nginx/html/MyFrame/src/libs/AppController.php",
"BizException" => "/search/nginx/html/MyFrame/src/libs/BizException.php",
"CaseTools" => "/search/nginx/html/MyFrame/src/libs/CaseTools.php",
"ConfigLoader" => "/search/nginx/html/MyFrame/src/libs/ConfigLoader.php",
"HttpFilter" => "/search/nginx/html/MyFrame/src/libs/HttpFilter.php",
"Logger" => "/search/nginx/html/MyFrame/src/libs/Logger.php",
"ObjectContainer" => "/search/nginx/html/MyFrame/src/libs/ObjectContainer.php",
"PDODriver" => "/search/nginx/html/MyFrame/src/libs/PDODriver.php",
"RedisUtil" => "/search/nginx/html/MyFrame/src/libs/RedisUtil.php",
"UnitWork" => "/search/nginx/html/MyFrame/src/libs/UnitWork.php",
"TodoModel" => "/search/nginx/html/MyFrame/src/model/TodoModel.php",
"VoteModel" => "/search/nginx/html/MyFrame/src/model/VoteModel.php",
"Viewer" => "/search/nginx/html/MyFrame/src/view/Viewer.php",
);
}
?>