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 /private/Model/Query.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 'private/Model/Query.php')
| -rw-r--r-- | private/Model/Query.php | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/private/Model/Query.php b/private/Model/Query.php new file mode 100644 index 0000000..df05b24 --- /dev/null +++ b/private/Model/Query.php @@ -0,0 +1,71 @@ +<?php + +declare(strict_types=1); + +namespace AugustOffensive\Model; + +/** + * Query object for storing relevant query information. + */ +class Query +{ + /** @var array $path array of request structure. */ + private $path; + + /** @var string $request type of request made to the server. */ + private $request; + + /** @var array $content structure of information sent to the server. */ + private $content; + + /** + * Store query information. + * + * @param array $path The array that holds the original request structure. + * @param string $request The request method made to the server. + * @param array $content The content object sent by the request. + * + * @return Query + */ + public function __construct ( + array $path, + string $request, + array $content + ) { + $this->path = $path; + $this->request = $request; + $this->content = $content; + + return $this; + } + + /** + * Returns the request path made by the client. + * + * @return array + */ + public function getPath (): array + { + return $this->path; + } + + /** + * Returns the request type made by the client. + * + * @return string + */ + public function get_request (): string + { + return $this->request; + } + + /** + * Returns the information that is built from outside the request path. + * + * @return array + */ + public function getContent (): array + { + return $this->content; + } +} |
