1<?php
2
3spl_autoload_register(
4    function ($class) {
5        if (strpos($class, 'IPLib\\') !== 0) {
6            return;
7        }
8        $file = __DIR__.DIRECTORY_SEPARATOR.'src'.str_replace('\\', DIRECTORY_SEPARATOR, substr($class, strlen('IPLib'))).'.php';
9        if (is_file($file)) {
10            require_once $file;
11        }
12    }
13);
14