aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorKevin Hoerr <kjhoerr@protonmail.com>2017-09-13 00:50:17 -0400
committerGitHub <noreply@github.com>2017-09-13 00:50:17 -0400
commit70ef99429394e142905a3058efc4c83a42517b67 (patch)
tree585996beb1a7f4b6c1fd4cd7e24619dff146b816 /index.php
parentcf5f5aee4831bb8476f2d593276b6ef17c3edc58 (diff)
downloadaugust-offensive-70ef99429394e142905a3058efc4c83a42517b67.tar.gz
august-offensive-70ef99429394e142905a3058efc4c83a42517b67.tar.bz2
august-offensive-70ef99429394e142905a3058efc4c83a42517b67.zip
2 - Tests (#3)
* Move autoload to separate script, add two unit tests * Add integration tests for Controller * Add unit test for Output * Fix Model\Result-as-a-method error * encode JSON output as utf-8, and retrieve as assoc array * Ignore utf-8 definitions
Diffstat (limited to 'index.php')
-rw-r--r--index.php16
1 files changed, 1 insertions, 15 deletions
diff --git a/index.php b/index.php
index 297227c..c38567d 100644
--- a/index.php
+++ b/index.php
@@ -4,21 +4,7 @@ declare(strict_types=1);
namespace AugustOffensive;
-// Borrowed and modified from PSR-4 Closure Example
-spl_autoload_register(
- function ($class) {
- $prefix = 'AugustOffensive\\';
- $relative_class = substr($class, strlen($prefix));
-
- // find file in /private/ in respective namespace path
- $file = __DIR__ . '/private/' . str_replace('\\', '/', $relative_class) . '.php';
-
- // if the file exists, require it
- if (file_exists($file)) {
- require $file;
- }
- }
-);
+require_once "autoload.php";
use AugustOffensive\View;
use AugustOffensive\Controller;