<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Presenters\Summary;

use Prettus\Repository\Presenter\FractalPresenter;
use Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Presenters\SummarySerializer;
use Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\TransformerContract;

/**
 * Class ZaznamSummaryPresenterAbstract
 *
 * @package Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Presenters\Summary
 */
abstract class ZaznamSummaryPresenterAbstract extends FractalPresenter
{
    /**
     * @var \Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\TransformerContract
     */
    private TransformerContract $transformer;

    /**
     * @param \Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\TransformerContract $dataTableTransformer
     *
     * @throws \Exception
     */
    public function __construct(TransformerContract $dataTableTransformer)
    {
        parent::__construct();

        $this->transformer = $dataTableTransformer;
    }

    /**
     * @return \Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Transformers\TransformerContract
     */
    public function getTransformer(): TransformerContract
    {
        return $this->transformer;
    }

    /**
     * @return \Seka\Portal\Modul\Statistiky\Repositories\Eloquent\Presenters\SummarySerializer
     */
    public function serializer(): SummarySerializer
    {
        return new SummarySerializer();
    }
}
