12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- class AutoLoader
- {
-
- private static function autoloadDompdf($className)
- {
- $pathDompdf = dirname(__FILE__) . '/../pdf/dompdf_config.inc.php';
- if (file_exists($pathDompdf)) {
- require_once $pathDompdf;
- }
- }
-
- private static function autoloadLog4php($className)
- {
- $pathLogphp = dirname(__FILE__) . '/../lib/log4php/'
- . $className . '.php';
- if (file_exists($pathLogphp)) {
- require_once $pathLogphp;
- }
- }
-
- private static function autoloadPhpdocx($className)
- {
- $pathPhpdocx = dirname(__FILE__) . '/' . $className . '.inc';
- if (file_exists($pathPhpdocx)) {
- require_once $pathPhpdocx;
- }
- }
-
- public static function load()
- {
- spl_autoload_register(array('AutoLoader', 'autoloadPhpdocx'));
- spl_autoload_register(array('AutoLoader', 'autoloadLog4php'));
- }
- public static function loadPDF()
- {
- spl_autoload_register(array('AutoLoader', 'autoloadDompdf'));
- }
- }
|