aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 6 insertions, 5 deletions
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;
}
}