autoload; cache; tests;
[m6w6/pq-gateway] / lib / autoload.php
diff --git a/lib/autoload.php b/lib/autoload.php
new file mode 100644 (file)
index 0000000..d7b0cd8
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+spl_autoload_register(function($c) {
+       if (substr($c, 0, 10) === "pq\\Gateway" || susbtr($c, 0, 8) === "pq\\Query") {
+               return include __DIR__ . "/" . strtr($c, "\\", "/") . ".php";
+       }
+});