. */ /** * PSR-4 autoloader * * For more information, please contact */ spl_autoload_register(function($class) { // check class starts with namespace $ns = 'Goat1000\\SVGGraph\\'; if(strpos($class, $ns) !== 0) return; $local_class = substr($class, strlen($ns)); $filename = __DIR__ . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $local_class) . '.php'; // if the file exists, load it if(file_exists($filename)) require $filename; // not found, fail silently });