Methods |
public
|
toLink(int $type = LinkType::DEFAULT, bool $compact = true): array
Get the deferred entity's canonical location in the form of an array
Get the deferred entity's canonical location in the form of an array
Implements
|
#
|
public
|
getUri(bool $compact = true): string
Get the deferred entity's canonical location in the form of a URI
Get the deferred entity's canonical location in the form of a URI
Implements
|
#
|
public
|
resolve(): SyncEntityInterface
Resolve the deferred entity from the provider or the local entity store
Resolve the deferred entity from the provider or the local entity store
This method returns the resolved entity without taking further action.
{@see DeferredEntityInterface::replace()} is called separately.
Implements
|
#
|
public
|
replace(SyncEntityInterface $entity): void
Resolve the deferred entity with an instance
Resolve the deferred entity with an instance
If $callback was given when the entity was deferred, it is called with
the given entity, otherwise the variable or property given via $replace
is replaced.
Subsequent calls to {@see DeferredEntityInterface::resolve()} return the
same instance.
Implements
|
#
|
public
static
|
defer(
SyncProviderInterface $provider,
?SyncContextInterface $context,
string $entity,
$entityId,
&$replace = null,
?Closure $callback = null,
): void
Defer retrieval of a sync entity
Defer retrieval of a sync entity
Parameters
$provider |
The provider servicing the entity.
|
$context |
The context within which the
provider is servicing the entity.
|
$entity |
The entity to instantiate.
|
$entityId |
The identifier of the deferred entity.
|
$replace |
Refers to the variable or property to
replace when the entity is resolved.
|
$callback |
If given, $replace is
ignored and the resolved entity is passed to the callback.
|
Implements
|
#
|
public
static
|
deferList(
SyncProviderInterface $provider,
?SyncContextInterface $context,
string $entity,
array $entityIds,
&$replace = null,
?Closure $callback = null,
): void
Defer retrieval of a list of sync entities
Defer retrieval of a list of sync entities
Parameters
$provider |
The provider servicing the entity.
|
$context |
The context within which the
provider is servicing the entity.
|
$entity |
The entity to instantiate.
|
$entityIds |
A list of deferred entity
identifiers.
|
$replace |
Refers to the variable or
property to replace when the entities are resolved.
|
$callback |
If given, $replace is
ignored and each resolved entity is passed to the callback.
|
Implements
|
#
|
public
|
getContext(): ?SyncContextInterface
Get the context within which the provider is servicing the entity
Get the context within which the provider is servicing the entity
Implements
|
#
|
public
|
__set(string $name, mixed $value): void
|
#
|
public
|
__get(string $name): mixed
|
#
|
public
|
__isset(string $name): bool
|
#
|
public
|
__unset(string $name): void
|
#
|