Methods |
public
static
|
checkProviderHeartbeats(int $ttl = 300, bool $failEarly = true, SyncProviderInterface ...$providers): SyncStoreInterface
Throw an exception if a sync provider's backend is unreachable (see {@see SyncStoreInterface::checkProviderHeartbeats()…
Throw an exception if a sync provider's backend is unreachable (see {@see SyncStoreInterface::checkProviderHeartbeats()})
|
#
|
public
static
|
deferEntity(
int $providerId,
class-string<SyncEntityInterface> $entityType,
int|string $entityId,
DeferredEntityInterface<SyncEntityInterface> $entity,
): SyncStoreInterface
Register a deferred entity with the entity store (see {@see SyncStoreInterface::deferEntity()})
Register a deferred entity with the entity store (see {@see SyncStoreInterface::deferEntity()})
|
#
|
public
static
|
deferRelationship(
int $providerId,
class-string<SyncEntityInterface> $entityType,
class-string<SyncEntityInterface> $forEntityType,
string $forEntityProperty,
int|string $forEntityId,
DeferredRelationshipInterface<SyncEntityInterface> $relationship,
): SyncStoreInterface
Register a deferred relationship with the entity store
Register a deferred relationship with the entity store
|
#
|
public
static
|
getBinaryRunUuid(): string
Get the UUID of the current run in raw binary form
Get the UUID of the current run in raw binary form
|
#
|
public
static
|
getDeferralCheckpoint(): int
Get a checkpoint to delineate between deferred entities and relationships that have already been registered, and any…
Get a checkpoint to delineate between deferred entities and relationships that have already been registered, and any subsequent deferrals (see {@see SyncStoreInterface::getDeferralCheckpoint()})
|
#
|
public
static
|
getEntity(
int $providerId,
class-string<SyncEntityInterface> $entityType,
int|string $entityId,
bool|null $offline = null,
): SyncEntityInterface|null
Get a sync entity from the entity store if it is available (see {@see SyncStoreInterface::getEntity()})
Get a sync entity from the entity store if it is available (see {@see SyncStoreInterface::getEntity()})
|
#
|
public
static
|
getEntityType(int $entityTypeId): class-string<SyncEntityInterface>
Get a sync entity type registered with the entity store
Get a sync entity type registered with the entity store
|
#
|
public
static
|
getEntityTypeId(class-string<SyncEntityInterface> $entityType): int
Get the entity type ID of a registered sync entity type
Get the entity type ID of a registered sync entity type
|
#
|
public
static
|
getEntityTypeUri(class-string<SyncEntityInterface> $entityType, bool $compact = true): string
Get the canonical URI of a sync entity type
Get the canonical URI of a sync entity type
|
#
|
public
static
|
getErrors(): SyncErrorCollectionInterface
Get sync operation errors recorded so far
Get sync operation errors recorded so far
|
#
|
public
static
|
getNamespaceHelper(class-string<SyncEntityInterface|SyncProviderInterface> $class): SyncNamespaceHelperInterface|null
Get a namespace helper for a sync entity type or provider interface, or null if it is not in a namespace with a…
Get a namespace helper for a sync entity type or provider interface, or null if it is not in a namespace with a registered helper
|
#
|
public
static
|
getNamespacePrefix(class-string<SyncEntityInterface|SyncProviderInterface> $class): string|null
Get a namespace prefix for a sync entity type or provider interface, or null if it is not in a registered namespace
Get a namespace prefix for a sync entity type or provider interface, or null if it is not in a registered namespace
|
#
|
public
static
|
getProvider(string|int $provider): SyncProviderInterface
Get a sync provider registered with the entity store (see {@see SyncStoreInterface::getProvider()})
Get a sync provider registered with the entity store (see {@see SyncStoreInterface::getProvider()})
|
#
|
public
static
|
getProviderId(SyncProviderInterface|string $provider): int
Get the provider ID by which a registered sync provider is uniquely identified in the entity store's backing database …
Get the provider ID by which a registered sync provider is uniquely identified in the entity store's backing database (see {@see SyncStoreInterface::getProviderId()})
|
#
|
public
static
|
getProviderSignature(SyncProviderInterface $provider): string
Get a stable value that uniquely identifies a sync provider with the entity store and is independent of its backing…
Get a stable value that uniquely identifies a sync provider with the entity store and is independent of its backing database
|
#
|
public
static
|
getRunId(): int
Get the run ID of the current run
Get the run ID of the current run
|
#
|
public
static
|
getRunUuid(): string
Get the UUID of the current run in hexadecimal form
Get the UUID of the current run in hexadecimal form
|
#
|
public
static
|
hasEntityType(class-string<SyncEntityInterface> $entityType): bool
Check if a sync entity type is registered with the entity store
Check if a sync entity type is registered with the entity store
|
#
|
public
static
|
hasProvider(SyncProviderInterface|string $provider): bool
Check if a sync provider is registered with the entity store (see {@see SyncStoreInterface::hasProvider()})
Check if a sync provider is registered with the entity store (see {@see SyncStoreInterface::hasProvider()})
|
#
|
public
static
|
recordError(SyncErrorInterface $error, bool $deduplicate = false): SyncStoreInterface
Register a non-fatal sync operation error with the entity store
Register a non-fatal sync operation error with the entity store
|
#
|
public
static
|
registerEntityType(class-string<SyncEntityInterface> $entityType): SyncStoreInterface
Register a sync entity type with the entity store if it is not already registered (see {@see SyncStoreInterface:…
Register a sync entity type with the entity store if it is not already registered (see {@see SyncStoreInterface::registerEntityType()})
|
#
|
public
static
|
registerNamespace(
string $prefix,
string $uri,
string $namespace,
SyncNamespaceHelperInterface|null $helper = null,
): SyncStoreInterface
Register a namespace for sync entities and their provider interfaces (see {@see SyncStoreInterface::registerNamespace()…
Register a namespace for sync entities and their provider interfaces (see {@see SyncStoreInterface::registerNamespace()})
|
#
|
public
static
|
registerProvider(SyncProviderInterface $provider): SyncStoreInterface
Register a sync provider with the entity store
Register a sync provider with the entity store
|
#
|
public
static
|
resolveDeferrals(
int|null $fromCheckpoint = null,
class-string<SyncEntityInterface>|null $entityType = null,
int|null $providerId = null,
): SyncEntityInterface[]
Resolve deferred entities and relationships recursively until no deferrals remain
Resolve deferred entities and relationships recursively until no deferrals remain
|
#
|
public
static
|
resolveDeferredEntities(
int|null $fromCheckpoint = null,
class-string<SyncEntityInterface>|null $entityType = null,
int|null $providerId = null,
): SyncEntityInterface[]
Resolve deferred entities
Resolve deferred entities
|
#
|
public
static
|
resolveDeferredRelationships(
int|null $fromCheckpoint = null,
class-string<SyncEntityInterface>|null $entityType = null,
class-string<SyncEntityInterface>|null $forEntityType = null,
string|null $forEntityProperty = null,
int|null $providerId = null,
): SyncEntityInterface[][]
Resolve deferred relationships
Resolve deferred relationships
|
#
|
public
static
|
runHasStarted(): bool
Check if a run of sync operations has started
Check if a run of sync operations has started
|
#
|
public
static
|
setEntity(
int $providerId,
class-string<SyncEntityInterface> $entityType,
int|string $entityId,
SyncEntityInterface $entity,
): SyncStoreInterface
Apply a sync entity retrieved from a provider to the entity store, resolving any matching deferred entities
Apply a sync entity retrieved from a provider to the entity store, resolving any matching deferred entities
|
#
|