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(Client $client, ResourceBuilder $builder, bool $preview)

Manager constructor.

startSync(Query $query = null)

Starts a new Synchronization. Will contain all the Resources currently present in the space.

continueSync(string $token)

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

Details

at line 49
__construct(Client $client, ResourceBuilder $builder, bool $preview)

Manager constructor.

Do not instantiate this class yourself, use Contentful\Delivery\Client::getSynchronizationManager instead.

Parameters

Client $client
ResourceBuilder $builder
bool $preview

See also

\Contentful\Delivery\Client::get

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

Starts a new Synchronization. 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 can be used to return only a subset of the space.

Parameters

Query $query

Return Value

Result

at line 88
Result continueSync(string $token)

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

Parameters

string $token

Return Value

Result

Exceptions

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