diff options
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/index.php b/index.php new file mode 100644 index 0000000..3e770fe --- /dev/null +++ b/index.php @@ -0,0 +1,41 @@ +<?php + +namespace AugustOffensive; + +include 'private/view/Result.php'; +include 'private/model/Connection.php'; + +use AugustOffensive\view; +use AugustOffensive\model; + +/** + * Constructive controller and initializer API for the service. + */ +class Api +{ + /** @var \Connection $connection the model database interface */ + private $connection; + + /** @var \Result $view the view interface that outputs result of the query */ + private $view; + + /** + * Initiates database connection and forwards environment to the view. + * + * @return Api + */ + public function __construct () + { + $connection = new model\Connection(); + $view = new view\Result($connection); + + // Provide hook for connecting through controller to justify query + $result = $view->collect(); + + // Leak the data + echo $result; + } +} + +new Api(); + |
