diff options
Diffstat (limited to 'private/Model/Result.php')
| -rw-r--r-- | private/Model/Result.php | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/private/Model/Result.php b/private/Model/Result.php new file mode 100644 index 0000000..ac08821 --- /dev/null +++ b/private/Model/Result.php @@ -0,0 +1,52 @@ +<?php + +declare(strict_types=1); + +namespace AugustOffensive\Model; +/** + * Result object for storing information to send back to the client. + */ +class Result +{ + /** @var string $resultType the type of result to return to the client. */ + private $resultType; + + /** @var array $result */ + private $result; + + /** + * Store result information. + * + * @param string $resultType The type of result to send back to the client. + * @param array $result The result object to send back to the client. + * + * @return Result + */ + public function __construct (string $resultType, array $result) + { + $this->resultType = $resultType; + $this->result = $result; + + return $this; + } + + /** + * Returns the result type of the Result. + * + * @return string + */ + public function getResultType (): string + { + return $this->resultType; + } + + /** + * Returns the result array of the Result. + * + * @return array + */ + public function getResult (): array + { + return $this->result; + } +}
\ No newline at end of file |
