From e35b049df539e60b28909daf8ce05b4451ba54f6 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Wed, 5 Jul 2017 20:55:44 -0400 Subject: Changed cred to disappearable object, fix compile errors --- index.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 0753d6b..1d59a8d 100644 --- a/index.php +++ b/index.php @@ -16,10 +16,10 @@ use AugustOffensive\model; */ class Api { - /** @var \Connection $connection the model database interface */ + /** @var model\Connection $connection the model database interface */ private $connection; - /** @var \Result $view the view interface that outputs result of the query */ + /** @var view\Result $view the view interface that outputs result of the query */ private $view; /** @@ -29,14 +29,15 @@ class Api */ public function __construct () { - $connection = new model\Connection(); - $view = new view\Result($connection); + $this->connection = new model\Connection(); + $this->view = new view\Result($this->connection); // Provide hook for connecting through controller to justify query - $result = $view->collect(); + $result = $this->view->collect(); // Leak the data echo $result; + return $this; } } -- cgit