ResponseModel.php 684 Bytes
Newer Older
Jacob Priddy's avatar
Jacob Priddy committed
1 2 3 4 5 6 7
<?php

namespace Source\UseCases\Users\Authenticate;

use Source\Entities\User;
use Source\Entities\Token;

Jacob Priddy's avatar
Jacob Priddy committed
8 9
class ResponseModel
{
Jacob Priddy's avatar
Jacob Priddy committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23
    /**
     * @var User
     */
    protected User $user;

    /**
     * @var Token
     */
    protected Token $token;

    /**
     * @param User  $user
     * @param Token $token
     */
Jacob Priddy's avatar
Jacob Priddy committed
24 25
    public function __construct(User $user, Token $token)
    {
Jacob Priddy's avatar
Jacob Priddy committed
26 27 28 29 30 31 32
        $this->user = $user;
        $this->token = $token;
    }

    /**
     * @return User
     */
Jacob Priddy's avatar
Jacob Priddy committed
33 34
    public function getUser(): User
    {
Jacob Priddy's avatar
Jacob Priddy committed
35 36 37 38 39 40
        return $this->user;
    }

    /**
     * @return Token
     */
Jacob Priddy's avatar
Jacob Priddy committed
41 42
    public function getToken(): Token
    {
Jacob Priddy's avatar
Jacob Priddy committed
43 44 45
        return $this->token;
    }
}