PEAR2_Net_RouterOS
1.0.0b1
A MikroTik RouterOS client
|
00001 <?php 00002 00022 namespace PEAR2\Net\RouterOS; 00023 00033 function autoload($class) 00034 { 00035 $namespace = __NAMESPACE__ . '\\'; 00036 if (strpos($class, $namespace) === 0) { 00037 $path = __DIR__ . DIRECTORY_SEPARATOR . 00038 strtr( 00039 substr($class, strlen($namespace)), '\\', DIRECTORY_SEPARATOR 00040 ) . '.php'; 00041 $file = realpath($path); 00042 if (is_string($file) && strpos($file, __DIR__) === 0) { 00043 include_once $file; 00044 } 00045 } 00046 } 00047 00048 spl_autoload_register(__NAMESPACE__ . '\autoload', true);