SyncService
in package
Uses
TStringTools, TNCLogger
Class SyncService
Table of Contents
- SYNC_ALL = 63
- SYNC_APPS = 1
- SYNC_CONTACTS = 32
- SYNC_GLOBALSCALE = 8
- SYNC_GROUPS = 4
- SYNC_REMOTES = 16
- SYNC_USERS = 2
- $ALERT : mixed
- $CRITICAL : mixed
- $DEBUG : mixed
- $EMERGENCY : mixed
- $ERROR : mixed
- $INFO : mixed
- $NOTICE : mixed
- $WARNING : mixed
- $circleRequest : CircleRequest
- $circleService : CircleService
- $configService : ConfigService
- $federatedEventService : federatedEventService
- $federatedUserService : FederatedUserService
- $groupManager : IGroupManager
- $memberRequest : MemberRequest
- $membershipService : MembershipService
- $outputService : OutputService
- $userManager : IUserManager
- __construct() : mixed
- SyncService constructor.
- alert() : void
- debug() : void
- e() : void
- emergency() : void
- exception() : void
- generateRandomSentence() : string
- generateRandomWord() : string
- getDateDiff() : string
- groupDeleted() : void
- groupMemberAdded() : void
- groupMemberRemoved() : void
- humanReadable() : string
- log() : void
- logger() : LoggerInterface
- notice() : void
- sync() : void
- syncApps() : void
- syncContacts() : void
- syncGlobalScale() : void
- syncNextcloudGroup() : Circle
- syncNextcloudGroups() : void
- syncNextcloudUser() : FederatedUser
- syncNextcloudUsers() : void
- syncRemote() : void
- syncRemoteCircle() : void
- t() : void
- throwable() : void
- userDeleted() : void
- warning() : void
- commonPart() : string
- cut() : string
- feedStringWithParams() : string
- isUuid() : bool
- token() : string
- uuid() : string
- Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
- generateGroupMember() : Member
- shouldSync() : bool
Constants
SYNC_ALL
public
mixed
SYNC_ALL
= 63
SYNC_APPS
public
mixed
SYNC_APPS
= 1
SYNC_CONTACTS
public
mixed
SYNC_CONTACTS
= 32
SYNC_GLOBALSCALE
public
mixed
SYNC_GLOBALSCALE
= 8
SYNC_GROUPS
public
mixed
SYNC_GROUPS
= 4
SYNC_REMOTES
public
mixed
SYNC_REMOTES
= 16
SYNC_USERS
public
mixed
SYNC_USERS
= 2
Properties
$ALERT
public
static mixed
$ALERT
= 3
$CRITICAL
public
static mixed
$CRITICAL
= 3
$DEBUG
public
static mixed
$DEBUG
= 0
$EMERGENCY
public
static mixed
$EMERGENCY
= 4
$ERROR
public
static mixed
$ERROR
= 3
$INFO
public
static mixed
$INFO
= 1
$NOTICE
public
static mixed
$NOTICE
= 1
$WARNING
public
static mixed
$WARNING
= 2
$circleRequest
private
CircleRequest
$circleRequest
$circleService
private
CircleService
$circleService
$configService
private
ConfigService
$configService
$federatedEventService
private
federatedEventService
$federatedEventService
$federatedUserService
private
FederatedUserService
$federatedUserService
$groupManager
private
IGroupManager
$groupManager
$memberRequest
private
MemberRequest
$memberRequest
$membershipService
private
MembershipService
$membershipService
$outputService
private
OutputService
$outputService
$userManager
private
IUserManager
$userManager
Methods
__construct()
SyncService constructor.
public
__construct(IUserManager $userManager, IGroupManager $groupManager, CircleRequest $circleRequest, MemberRequest $memberRequest, FederatedUserService $federatedUserService, federatedEventService $federatedEventService, CircleService $circleService, MembershipService $membershipService, OutputService $outputService, ConfigService $configService) : mixed
Parameters
- $userManager : IUserManager
- $groupManager : IGroupManager
- $circleRequest : CircleRequest
- $memberRequest : MemberRequest
- $federatedUserService : FederatedUserService
- $federatedEventService : federatedEventService
- $circleService : CircleService
- $membershipService : MembershipService
- $outputService : OutputService
- $configService : ConfigService
Return values
mixed —alert()
public
alert(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —debug()
public
debug(string $message[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $serializable : array<string|int, mixed> = []
Return values
void —e()
public
e(Exception $e[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $e : Exception
- $serializable : array<string|int, mixed> = []
Return values
void —emergency()
public
emergency(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —exception()
public
exception(Exception $e[, int|array<string|int, mixed> $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $e : Exception
- $level : int|array<string|int, mixed> = 3
- $serializable : array<string|int, mixed> = []
Return values
void —generateRandomSentence()
public
generateRandomSentence([int $words = 5 ]) : string
Parameters
- $words : int = 5
Return values
string —generateRandomWord()
public
generateRandomWord([int $length = 8 ]) : string
Parameters
- $length : int = 8
Return values
string —getDateDiff()
public
getDateDiff(int $first, int $second[, bool $short = false ][, array<string|int, mixed> $words = [] ]) : string
Parameters
- $first : int
- $second : int
- $short : bool = false
- $words : array<string|int, mixed> = []
Tags
Return values
string —groupDeleted()
public
groupDeleted(string $groupId) : void
Parameters
- $groupId : string
Tags
Return values
void —groupMemberAdded()
public
groupMemberAdded(string $groupId, string $userId) : void
Parameters
- $groupId : string
- $userId : string
Tags
Return values
void —groupMemberRemoved()
public
groupMemberRemoved(string $groupId, string $userId) : void
Parameters
- $groupId : string
- $userId : string
Tags
Return values
void —humanReadable()
public
humanReadable(int $bytes) : string
Parameters
- $bytes : int
Return values
string —log()
public
log(int $level, string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $level : int
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —logger()
public
logger() : LoggerInterface
Return values
LoggerInterface —notice()
public
notice(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —sync()
public
sync([int $sync = self::SYNC_ALL ]) : void
Parameters
- $sync : int = self::SYNC_ALL
Return values
void —syncApps()
public
syncApps() : void
Return values
void —syncContacts()
public
syncContacts() : void
Return values
void —syncGlobalScale()
public
syncGlobalScale() : void
Return values
void —syncNextcloudGroup()
public
syncNextcloudGroup(string $groupId) : Circle
Parameters
- $groupId : string
Tags
Return values
Circle —syncNextcloudGroups()
public
syncNextcloudGroups() : void
Return values
void —syncNextcloudUser()
public
syncNextcloudUser(string $userId) : FederatedUser
Parameters
- $userId : string
Tags
Return values
FederatedUser —syncNextcloudUsers()
public
syncNextcloudUsers() : void
Return values
void —syncRemote()
public
syncRemote() : void
Return values
void —syncRemoteCircle()
public
syncRemoteCircle(string $circleId) : void
Parameters
- $circleId : string
Return values
void —t()
public
t(Throwable $t[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $t : Throwable
- $serializable : array<string|int, mixed> = []
Return values
void —throwable()
public
throwable(Throwable $t[, int $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $t : Throwable
- $level : int = 3
- $serializable : array<string|int, mixed> = []
Return values
void —userDeleted()
public
userDeleted(string $userId) : void
Parameters
- $userId : string
Tags
Return values
void —warning()
public
warning(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —commonPart()
protected
commonPart(string $str1, string $str2[, bool $cs = true ]) : string
Parameters
- $str1 : string
- $str2 : string
- $cs : bool = true
-
case sensitive ?
Return values
string —cut()
protected
cut(string $line, int $length) : string
Parameters
- $line : string
- $length : int
Return values
string —feedStringWithParams()
protected
feedStringWithParams(string $line, array<string|int, mixed> $params) : string
Parameters
- $line : string
- $params : array<string|int, mixed>
Return values
string —isUuid()
protected
isUuid(string $uuid) : bool
Parameters
- $uuid : string
Return values
bool —token()
protected
token([int $length = 15 ]) : string
Parameters
- $length : int = 15
Return values
string —uuid()
Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
protected
uuid(int $length) : string
Parameters
- $length : int
Return values
string —generateGroupMember()
private
generateGroupMember(Circle $circle, string $userId) : Member
Parameters
- $circle : Circle
- $userId : string
Tags
Return values
Member —shouldSync()
private
shouldSync(int $item, int $all) : bool
Parameters
- $item : int
- $all : int