<?php


namespace App\Model\Facades\Readers;


use App\Model\Services\DkpService;

class DkpReader extends BaseReader
{
    /** @var DkpService */
    protected $dkpService;
    /** @var UserReader */
    protected $userReader;
    /** @var SiteReader */
    protected $siteReader;

    public function __construct(DkpService $dkpService, UserReader $userReader, SiteReader $siteReader)
    {
        $this->dkpService = $dkpService;
        $this->userReader = $userReader;
        $this->siteReader = $siteReader;
    }

    public function getUsersDkp($guild, $player)
    {
        $site = $this->siteReader->validateSite($guild);
        $user = $this->userReader->validateUser($player);

        return $this->dkpService->getUsersDkp($site, $user);
    }

}