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