|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
/* |
|
|
4 |
* This file is part of the Assetic package, an OpenSky project. |
|
|
5 |
* |
|
|
6 |
* (c) 2010-2011 OpenSky Project Inc |
|
|
7 |
* |
|
|
8 |
* For the full copyright and license information, please view the LICENSE |
|
|
9 |
* file that was distributed with this source code. |
|
|
10 |
*/ |
|
|
11 |
|
|
|
12 |
spl_autoload_register(function($class) |
|
|
13 |
{ |
|
|
14 |
if (0 === strpos($class, 'Assetic\\Test\\')) { |
|
|
15 |
$file = __DIR__ . '/../tests/' . str_replace('\\', '/', $class) . '.php'; |
|
|
16 |
if (file_exists($file)) { |
|
|
17 |
require_once $file; |
|
|
18 |
return true; |
|
|
19 |
} |
|
|
20 |
} elseif (0 === strpos($class, 'Assetic\\')) { |
|
|
21 |
$file = __DIR__ . '/../src/' . str_replace('\\', '/', $class) . '.php'; |
|
|
22 |
if (file_exists($file)) { |
|
|
23 |
require_once $file; |
|
|
24 |
return true; |
|
|
25 |
} |
|
|
26 |
} elseif (isset($_SERVER['TWIG_LIB']) && 0 === strpos($class, 'Twig_')) { |
|
|
27 |
$file = $_SERVER['TWIG_LIB'] . '/' . str_replace('_', '/', $class) . '.php'; |
|
|
28 |
if (file_exists($file)) { |
|
|
29 |
require_once $file; |
|
|
30 |
return true; |
|
|
31 |
} |
|
|
32 |
} |
|
|
33 |
}); |
|
|
34 |
|
|
|
35 |
if (isset($_SERVER['LESSPHP'])) { |
|
|
36 |
require_once $_SERVER['LESSPHP']; |
|
|
37 |
} |
|
|
38 |
|
|
|
39 |
if (isset($_SERVER['CSSMIN'])) { |
|
|
40 |
require_once $_SERVER['CSSMIN']; |
|
|
41 |
} |
|
|
42 |
|
|
|
43 |
if (isset($_SERVER['PACKAGER'])) { |
|
|
44 |
require_once $_SERVER['PACKAGER']; |
|
|
45 |
} |