-
Notifications
You must be signed in to change notification settings - Fork 1
/
__autoload.php
40 lines (32 loc) · 1.38 KB
/
__autoload.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
<?php
/**
* Автозагрузка классов для работы abcpApiSiteExample
* @param string $class Имя класса
*/
function abcpApiSiteExampleAutoload($class = NULL)
{
static $classFiles = NULL;
if ($classFiles === NULL) {
$classFiles = array(
'search' => 'controllers/search.php',
'helper' => 'controllers/helper.php',
'ajaxrouter' => 'controllers/ajax/ajax.router.php',
'ajax\base' => 'controllers/ajax/ajax.base.php',
'smarty' => 'vendor/smarty/smarty/distribution/libs/Smarty.class.php',
'publicapiclient' => 'web.service/public.api/public.api.client.php',
'publicapiconfig' => 'web.service/public.api/public.api.config.php',
'restjsonclient' => 'web.service/rest.json.client.php',
'restjsonrequest' => 'web.service/rest.json.request.php',
'restrequest' => 'web.service/rest.request.php',
'restrequestsender' => 'web.service/rest.request.sender.php',
'serviceerrors' => 'web.service/service.errors.php',
'serviceexceptions' => 'web.service/service.exceptions.php',
);
}
$className = strtolower($class);
$classPath = $classFiles[$className];
if (isset($classPath)) {
require_once __DIR__ . '/' . $classPath;
}
}
spl_autoload_register('abcpApiSiteExampleAutoload');