/** * Loads our $repository with the actual Repo associated with our IEventRepository * * @param IEventRepository $eventRepository * @param ICategoryRepository $categoryRepository * @param ISponsorRepository $sponsorRepository */ public function __construct(IEventRepository $eventRepository, ICategoryRepository $categoryRepository, ISponsorRepository $sponsorRepository) { $this->sponsorRepository = $sponsorRepository; $this->categoryRepository = $categoryRepository; //$this->repository is inherited $this->repository = $eventRepository; parent::__construct($eventRepository); }
/** * Loads our $repositoryClassInstance with the actual Repo associated with our IEventRepository * * @param IEventRepository $eventRepository * */ public function __construct(ISponsorRepository $sponsorRepository) { $this->repositoryClassInstance = $sponsorRepository; parent::__construct($sponsorRepository); }
/** * Loads our $repositoryClassInstance with the actual Repo associated with our ICategoryRepository * * @param ICategoryRepository $categoryRepository * */ public function __construct(ICategoryRepository $categoryRepository) { $this->repositoryClassInstance = $categoryRepository; parent::__construct($categoryRepository); }