/** * @param Repository $repository */ public function __construct(Repository $repository) { $this->repository = $repository; parent::__construct(function ($id) { return new Locale($this->repository, $id); }); }
/** * @param Locale $locale */ public function __construct(Locale $locale) { $this->locale = $locale; parent::__construct(function ($id) { return new Calendar($this->locale, $this->locale["ca-{$id}"]); }); }