diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-07-08 11:11:53 -0400 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2017-07-08 11:11:53 -0400 |
| commit | 2d796d48df6f4371111bcbc776ea781e4f45c831 (patch) | |
| tree | 8b70da2114d71d2835b2f58eb2d43083a3ff5a6f /index.php | |
| parent | 3b75177580e536ce309d44759eb4d1f772c987ce (diff) | |
| download | august-offensive-2d796d48df6f4371111bcbc776ea781e4f45c831.tar.gz august-offensive-2d796d48df6f4371111bcbc776ea781e4f45c831.tar.bz2 august-offensive-2d796d48df6f4371111bcbc776ea781e4f45c831.zip | |
Expand on query and result, begin sql design
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 49 |
1 files changed, 14 insertions, 35 deletions
@@ -4,42 +4,21 @@ declare(strict_types=1); namespace AugustOffensive; -include 'private/model/Connection.php'; -include 'private/view/Result.php'; -include 'private/controller/Controller.php'; +// y u no autoload +include 'private/Model/Connection.php'; +include 'private/Model/Query.php'; +include 'private/Model/Result.php'; +include 'private/View/Main.php'; +include 'private/Controller/Controller.php'; -use AugustOffensive\view; -use AugustOffensive\model; +use AugustOffensive\View; +use AugustOffensive\Model; -/** - * Constructive controller and initializer API for the service. - */ -class Api -{ - /** @var model\Connection $connection the model database interface */ - private $connection; +// initiate connection and build front-end +$connection = new Model\Connection(); +$view = new View\Main($connection); - /** @var view\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 () - { - $this->connection = new model\Connection(); - $this->view = new view\Result($this->connection); - - // Provide hook for connecting through controller to justify query - $result = $this->view->collect(); - - // Leak the data - echo $result; - return $this; - } -} - -new Api(); +// get results of query from front-end +$result = $view->generateResult(); +echo $result; |
