From 92465af465886f14f22bb60dd974a93baa9c5322 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 21 Jun 2017 23:03:15 -0400 Subject: Add basic MVC structure with namespacing and PHPDOC (not tested) --- README.md | 2 +- index.php | 41 +++++++++++++++++++++++++++++++++++++++ private/controller/Controller.php | 16 +++++++++++++++ private/model/Connection.php | 19 ++++++++++++++++++ private/view/Result.php | 39 +++++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 index.php create mode 100644 private/controller/Controller.php create mode 100644 private/model/Connection.php create mode 100644 private/view/Result.php diff --git a/README.md b/README.md index 968ce67..5224954 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,6 @@ The main goal of August Offensive is to enable players to interact with the serv ## Technical Objectives -The web service will provide a RESTful API that is written in PHP 7 and connects to a PostGreSQL database. This connection will be managed behind an abstraction layer using PDO. The service will handle users and their game sessions. +The web service will provide a RESTful API that is written in PHP 7 and connects to a PostGreSQL database. This connection will be managed behind an abstraction layer using PDO. The service will handle users and their game sessions. In addition, all PHP code shall follow PSR-1, PSR-2, PSR-4, and PSR-5 coding standards. It is also recommended to try to write as immutably as possible. The front-end of this project will be written using [Elm](http://elm-lang.org/). Work on the front-end portion will not begin until August Offensive's web API has reached relative stability. The version for target stability is alpha 1.0.0. diff --git a/index.php b/index.php new file mode 100644 index 0000000..3e770fe --- /dev/null +++ b/index.php @@ -0,0 +1,41 @@ +collect(); + + // Leak the data + echo $result; + } +} + +new Api(); + diff --git a/private/controller/Controller.php b/private/controller/Controller.php new file mode 100644 index 0000000..73d0210 --- /dev/null +++ b/private/controller/Controller.php @@ -0,0 +1,16 @@ +