Example #1
0
 /**
  * @param BusinessLayer\Subscription $subscriptions
  * @param IL10N $l10n
  * @param ICacheFactory $cacheFactory
  * @param ICalendar $calendar
  * @param ObjectFactory $factory
  * @throws BackendUtils\DoesNotExistException if no corresponding subscription was found
  */
 public function __construct(BusinessLayer\Subscription $subscriptions, IL10N $l10n, ICacheFactory $cacheFactory, ICalendar $calendar, ObjectFactory $factory)
 {
     parent::__construct($subscriptions, $l10n, $cacheFactory);
     $this->calendar = $calendar;
     $this->factory = $factory;
     try {
         $calendar = $this->calendar;
         $this->subscription = $this->subscriptions->findByType($calendar->getPrivateUri(), self::IDENTIFIER, $calendar->getUserId());
     } catch (BusinessLayer\Exception $ex) {
         throw new BackendUtils\DoesNotExistException($ex->getMessage());
     }
 }
 /**
  * @param BusinessLayer\Subscription $subscriptions
  * @param IL10N $l10n
  * @param ICacheFactory $cacheFactory
  * @param IBackend $backend
  * @param CalendarFactory $calendarFactory
  */
 public function __construct(BusinessLayer\Subscription $subscriptions, IL10N $l10n, ICacheFactory $cacheFactory, IBackend $backend, CalendarFactory $calendarFactory)
 {
     parent::__construct($subscriptions, $l10n, $cacheFactory);
     $this->backend = $backend;
     $this->factory = $calendarFactory;
 }