getPrimaryKey() === null) { return null; } return (int)$this->getPrimaryKey(); } public function getUserId(): int { return $this->getField(self::FIELD_USER); } public function getUserShared(): int { return $this->getField(self::FIELD_USER_SHARED); } public function setUserId(int $userId): void { $this->setField(self::FIELD_USER, $userId); } public function setUserShared(int $userShared): void { $this->setField(self::FIELD_USER_SHARED, $userShared); } public function jsonSerialize() { return [ 'sharingId' => $this->getSharingId(), 'userId' => $this->getUserId(), 'userSharedId' => $this->getUserShared(), ]; } }