diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-06-23 19:46:08 -0400 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-06-23 19:46:08 -0400 |
| commit | 92a7e43b7d4792cdb54eceefd3256324a8eca458 (patch) | |
| tree | c224be987667d14f54b5794181e53b216f970e07 | |
| parent | 92465af465886f14f22bb60dd974a93baa9c5322 (diff) | |
| download | august-offensive-92a7e43b7d4792cdb54eceefd3256324a8eca458.tar.gz august-offensive-92a7e43b7d4792cdb54eceefd3256324a8eca458.tar.bz2 august-offensive-92a7e43b7d4792cdb54eceefd3256324a8eca458.zip | |
Fix compilation errors, return JSON from view\Result->Collect()
| -rw-r--r-- | index.php | 3 | ||||
| -rw-r--r-- | private/controller/Controller.php | 2 | ||||
| -rw-r--r-- | private/view/Result.php | 9 |
3 files changed, 5 insertions, 9 deletions
@@ -2,8 +2,9 @@ namespace AugustOffensive; -include 'private/view/Result.php'; include 'private/model/Connection.php'; +include 'private/view/Result.php'; +include 'private/controller/Controller.php'; use AugustOffensive\view; use AugustOffensive\model; diff --git a/private/controller/Controller.php b/private/controller/Controller.php index 73d0210..84bd4e7 100644 --- a/private/controller/Controller.php +++ b/private/controller/Controller.php @@ -2,8 +2,6 @@ namespace AugustOffensive\controller; -include '../model/Connection.php'; - use AugustOffensive\model; /** diff --git a/private/view/Result.php b/private/view/Result.php index 5241e0c..0a2dd95 100644 --- a/private/view/Result.php +++ b/private/view/Result.php @@ -2,9 +2,6 @@ namespace AugustOffensive\view; -include '../controller/Controller.php'; -include '../model/Connection.php'; - use AugustOffensive\controller; use AugustOffensive\model; @@ -20,7 +17,7 @@ class Result * * @return Result */ - public function __construct (Connection $connection) + public function __construct (model\Connection $connection) { header("Content-Type: application/json"); // @@ -29,11 +26,11 @@ class Result /** * Communicates with the controller to generate the JSON result. * - * @return array $result resulting sendback object generated from query. + * @return string $result resulting sendback object generated from query. */ public function collect () { // - return array(); + return json_encode(array("Result-Type" => "", "Content" => array())); } } |
