function __construct() { FastCache::setup(['cache.path' => APP_ROOT . '/cache']); $twig = new Twig(); $this->calendarClient = new CalendarClient(); $this->calendarService = new CalendarService($this->calendarClient); $this->eventView = new EventView($twig->getTwigEnvironment()); $this->eventAggregator = new EventAggregator(); $this->registeredCalendars = new RegisteredCalendars(); }
function __construct(CalendarClient $client) { $this->client = $client; $this->googleService = new Google_Service_Calendar($client->getGoogleClient()); $this->cache = FastCache::file(strtotime('+10 minute')); }