addType('enabled', 'integer'); $this->addType('mailAccountId', 'integer'); $this->addType('autoAccept', 'integer'); $this->addType('syncInterval', 'integer'); } public function isEnabled(): bool { return $this->getEnabled() === 1; } public function isAutoAccept(): bool { return $this->getAutoAccept() === 1; } public function toArray(): array { return [ 'id' => $this->getId(), 'userId' => $this->getUserId(), 'enabled' => $this->isEnabled(), 'mailAccountId' => $this->getMailAccountId(), 'calendarUri' => $this->getCalendarUri(), 'autoAccept' => $this->isAutoAccept(), 'syncInterval' => $this->getSyncInterval(), ]; } }