diff options
Diffstat (limited to 'private')
| -rw-r--r-- | private/controller/Controller.php | 16 | ||||
| -rw-r--r-- | private/model/Connection.php | 19 | ||||
| -rw-r--r-- | private/view/Result.php | 39 |
3 files changed, 74 insertions, 0 deletions
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 @@ +<?php + +namespace AugustOffensive\controller; + +include '../model/Connection.php'; + +use AugustOffensive\model; + +/** + * Static controller class for interfacing between the view and the model. + */ +class Controller +{ + // +} + diff --git a/private/model/Connection.php b/private/model/Connection.php new file mode 100644 index 0000000..26632f7 --- /dev/null +++ b/private/model/Connection.php @@ -0,0 +1,19 @@ +<?php + +namespace AugustOffensive\model; + +/** + * Model connection class for connecting to database via PDO. + */ +class Connection +{ + /** + * Initiates connection to PostGreSQL database. + * + * @return Connection + */ + public function __construct () + { + // + } +} diff --git a/private/view/Result.php b/private/view/Result.php new file mode 100644 index 0000000..5241e0c --- /dev/null +++ b/private/view/Result.php @@ -0,0 +1,39 @@ +<?php + +namespace AugustOffensive\view; + +include '../controller/Controller.php'; +include '../model/Connection.php'; + +use AugustOffensive\controller; +use AugustOffensive\model; + +/** + * Outputs the JSON result by communicating with the controller. + */ +class Result +{ + /** + * Prepares the output and environment for the front end of the service. + * + * @param \Connection $connection "needs to know" model exists + * + * @return Result + */ + public function __construct (Connection $connection) + { + header("Content-Type: application/json"); + // + } + + /** + * Communicates with the controller to generate the JSON result. + * + * @return array $result resulting sendback object generated from query. + */ + public function collect () + { + // + return array(); + } +} |
