aboutsummaryrefslogtreecommitdiff
path: root/private/Model/Result.php
blob: ac08821fb081acb3fbaeaf671f052f28164097c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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;
    }
}