<?php
class ProductionRepository {
    private $raceRepo;
    private $optimizerRepo;

    public function __construct(RaceRepository $raceRepo, OptimizerRepository $optimizerRepo) {
        $this->raceRepo = $raceRepo;
        $this->optimizerRepo = $optimizerRepo;
    }

    public function payload($raceDate, $venue='', $raceNum=0) {
        return array(
            'summary' => $this->optimizerRepo->summaries($raceDate,$venue,$raceNum),
            'ranking' => $this->raceRepo->productionRows($raceDate,$venue,$raceNum)
        );
    }
}
