SoPHIE API Documentation

Sync API Documentation

SoPHIE Sync API Class

The Sync API provides functionality for checking if participants are in sync.
A sync condition is defined as a situation where all participants (for everyone
sync) or participants from a specific group (for group sync) are in the same
procedural context (same step and same stepgroupLoop) at the same time.

Init: $syncApi = $api->get('sophie_sync');

Method: $syncApi->remainingEveryone(...)

Get number of remaining participants missing for a sync condition.

Parameters:

  • array $inStates
  • null|String $stepLabel
  • null|int $stepgroupLoop

Returns Integer

Method: $syncApi->checkEveryone(...)

Checks whether every participant is in the current procedural context.

Parameters:

  • array $inStates

Returns Boolean

Method: $syncApi->remainingGroup(...)

Get number of remaining participants from a group missing for a sync condition.

Parameters:

  • string $groupLabel
  • array $inStates

Returns Integer

Method: $syncApi->checkGroup(...)

Checks whether every participant from a group is in the current procedural context.

Parameters:

  • string $groupLabel
  • array $inStates

Returns Boolean

Method: $syncApi->remainingType(...)

Get number of remaining participants from a type missing for a sync condition.

Parameters:

  • string $typeLabel
  • array $inStates

Returns Integer

Method: $syncApi->checkType(...)

Checks whether every participant from a type is in the current procedural context.

Parameters:

  • string $typeLabel
  • array $inStates

Returns Boolean

Method: $syncApi->checkAdmin(...)

Get sync status for admin sync steps

Parameters:

  • null|String $stepLabel
  • null|int $stepgroupLoop

Returns Boolean

Method: $syncApi->setAdmin(...)

Set sync status for admin sync step

Parameters:

  • null|String $stepLabel
  • null|int $stepgroupLoop

Returns Boolean

Method: $syncApi->getAdminTimestamp(...)

Get sync timestamp for admin sync steps

Parameters:

  • null|String $stepLabel
  • null|int $stepgroupLoop

Returns Integer