diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-06-21 23:03:15 -0400 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-06-21 23:03:15 -0400 |
| commit | 92465af465886f14f22bb60dd974a93baa9c5322 (patch) | |
| tree | 2f9a660371cab99e842e4a93ad9818128e6e3390 /index.php | |
| parent | 4406034152597a049de0706520a274f6e6271fe9 (diff) | |
| download | august-offensive-92465af465886f14f22bb60dd974a93baa9c5322.tar.gz august-offensive-92465af465886f14f22bb60dd974a93baa9c5322.tar.bz2 august-offensive-92465af465886f14f22bb60dd974a93baa9c5322.zip | |
Add basic MVC structure with namespacing and PHPDOC (not tested)
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(); + |
