class Manager

The synchronization Manager can be used to sync a Space to this server.

It provides notifications about added, updated and deleted assets and entries.

Methods

__construct(SynchronizationClientInterface $client, ResourceBuilderInterface $builder, bool $isDeliveryApi)

Manager constructor.

sync(string $token = null, Query $query = null)

No description

startSync(Query $query = null)

Starts a new Synchronization.

continueSync(string|Result $token)

Continues the synchronization either at the next page, or with the results since the initial synchronization.

Details

at line 50
__construct(SynchronizationClientInterface $client, ResourceBuilderInterface $builder, bool $isDeliveryApi)

Manager constructor.

Do not instantiate this class yourself, use SynchronizationClientInterface::getSynchronizationManager() instead.

Parameters

SynchronizationClientInterface $client
ResourceBuilderInterface $builder
bool $isDeliveryApi

See also

Client::getSynchronizationManager()

at line 63
Generator sync(string $token = null, Query $query = null)

Parameters

string $token
Query $query

Return Value

Generator An instance of Result wrapped in a Generator object

at line 84
Result startSync(Query $query = null)

Starts a new Synchronization.

The result will contain all the resources currently present in the space. By calling Result::isDone(), it can be checked if there's another page of results, if so call continueSync to get the next page.

A Query object can be used to return only a subset of the space.

Parameters

Query $query

Return Value

Result

at line 100
continueSync(string|Result $token)

Continues the synchronization either at the next page, or with the results since the initial synchronization.

Parameters

string|Result $token

Exceptions

RuntimeException if this method is used for a subsequent sync when used with the Preview API