/** * @param $calendarId * @param $objectUri * @param $operation */ protected function addChange($calendarId, $objectUri, $operation) { $calendar = $this->manager->findById('public', 'calendar', $calendarId); $change = ['uri' => $objectUri, 'synctoken' => $calendar->synctoken, 'calendarid' => $calendarId, 'operation' => $operation]; $this->manager->insertOne('public', 'calendarchange', $change); $sql = 'UPDATE calendar SET synctoken = synctoken + 1 WHERE uid = ' . $calendarId; $this->manager->query($sql); }