Class Salient\Sync\Http\HttpSyncDefinition

<TEntity is SyncEntityInterface, TProvider is HttpSyncProvider>

final
extends AbstractSyncDefinition<TEntity, TProvider>
implements Buildable<HttpSyncDefinitionBuilder<TEntity, TProvider>>
uses HasBuilder, HasMutator

Generates closures that use an HttpSyncProvider to perform sync operations on an entity

Override {@see HttpSyncProvider::buildHttpDefinition()} to service HTTP endpoints declaratively via {@see HttpSyncDefinition} objects.

If more than one implementation of a sync operation is available for an entity, the order of precedence is as follows:

  1. The callback in {@see AbstractSyncDefinition::$Overrides} for the operation
  2. The provider method declared for the operation, e.g. Provider::getFaculties() or Provider::createUser()
  3. The closure returned by {@see AbstractSyncDefinition::getClosure()} for the operation

If no implementations are found, {@see SyncOperationNotImplementedException} is thrown.

Type aliases
OverrideClosure (Closure(static, SyncOperation::*, SyncContextInterface, int|string|null, mixed...): TEntity)|(Closure(static, SyncOperation::*, SyncContextInterface, mixed...): iterable<TEntity>)|(Closure(static, SyncOperation::*, SyncContextInterface, TEntity, mixed...): TEntity)|(Closure(static, SyncOperation::*, SyncContextInterface, iterable<TEntity>, mixed...): iterable<TEntity>) #
Methods
Methods inherited from Salient\Sync\AbstractSyncDefinition
__construct(), withConformity(), withFilterPolicy(), withKeyMap(), withKeyMapFlags(), withPipelineFromBackend(), withPipelineToBackend(), withReadFromList(), withReturnEntitiesFrom(), getOperationClosure(), getFallbackClosure(), getPipelineToBackend(), getPipelineFromBackend(),
Methods used from Salient\Core\Concern\HasChainableMethods
apply(), if(), withEach()
Methods used from Salient\Core\Concern\HasBuilder
getBuilder(), build(), resolve()
Constants
Properties
Properties inherited from Salient\Sync\AbstractSyncDefinition
$Entity, $Provider, $Operations, $Conformity, $FilterPolicy, $Overrides, $KeyMap, $KeyMapFlags, $PipelineFromBackend, $PipelineToBackend, $ReadFromList, $ReturnEntitiesFrom, $EntityReflector, $ProviderReflector