Class Salient\Sync\Http\HttpSyncDefinition

<TEntity is SyncEntityInterface, TProvider is HttpSyncProvider>

final
extends AbstractSyncDefinition<TEntity, TProvider>
implements Buildable<HttpSyncDefinitionBuilder<TEntity, TProvider>>
uses BuildableTrait, ImmutableTrait

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<array-key, TEntity>)|(Closure(static, SyncOperation::*, SyncContextInterface, TEntity, mixed...): TEntity)|(Closure(static, SyncOperation::*, SyncContextInterface, iterable<TEntity>, mixed...): iterable<array-key, TEntity>) #
Methods
Methods inherited from Salient\Sync\AbstractSyncDefinition
getClosure(), withConformity(), withFilterPolicy(), withKeyMap(), withKeyMapFlags(), withPipelineFromBackend(), withPipelineToBackend(), withReadFromList(), withReturnEntitiesFrom(), getOperationClosure(), getFallbackClosure(), getPipelineToBackend(), getPipelineFromBackend(),
Methods used from Salient\Core\Concern\ChainableTrait
apply(), applyIf(), applyForEach()
Methods used from Salient\Core\Concern\ImmutableTrait
with(), without(), handlePropertyChanged()
Methods used from Salient\Core\Concern\BuildableTrait
getBuilder(), build(), resolve()
Methods used from Salient\Core\Concern\ImmutableTrait
with(), without(), handlePropertyChanged()
Constants
Constants inherited from Salient\Contract\HasConformity
CONFORMITY_NONE, CONFORMITY_PARTIAL, CONFORMITY_COMPLETE
Properties
Properties inherited from Salient\Sync\AbstractSyncDefinition
$Entity, $Provider, $Operations, $Conformity, $FilterPolicy, $Overrides, $KeyMap, $KeyMapFlags, $PipelineFromBackend, $PipelineToBackend, $ReadFromList, $ReturnEntitiesFrom, $EntityReflector, $ProviderReflector