Methods |
public
static
|
getService<T is object>(ContainerInterface $container, class-string<T> $service): static<T>
Get an introspector for a service
Get an introspector for a service
Uses a container to resolve a service to a concrete class and returns an
introspector for it.
Overrides
|
#
|
public
static
|
get<T is object>(class-string<T> $class): static<T>
Get an introspector for a class
Get an introspector for a class
Overrides
|
#
|
protected
|
getIntrospectionClass(class-string<TClass> $class): SyncIntrospectionClass<TClass>
|
#
|
public
|
getCreateSyncEntityFromClosure(
bool $strict = false,
): Closure(mixed[], SyncProviderInterface, SyncContextInterface): TClass
Get a closure that creates SyncProviderInterface-serviced instances of the class
from arrays
Get a closure that creates SyncProviderInterface-serviced instances of the class
from arrays
Wraps {@see SyncIntrospector::getCreateSyncEntityFromSignatureClosure()}
in a closure that resolves array signatures to closures on-demand.
Parameters
$strict |
If true , the closure will throw an exception if it
receives any data that would be discarded.
|
|
#
|
public
|
getCreateSyncEntityFromSignatureClosure(
string[] $keys,
bool $strict = false,
): Closure(mixed[], SyncProviderInterface, SyncContextInterface): TClass
Get a closure that creates SyncProviderInterface-serviced instances of the class
from arrays with a given signature
Get a closure that creates SyncProviderInterface-serviced instances of the class
from arrays with a given signature
Parameters
$strict |
If true , throw an exception if any data would be
discarded.
|
|
#
|
public
|
getMagicSyncOperationClosure(string $method, SyncProviderInterface $provider): ?Closure
Get a closure to perform sync operations on behalf of a provider's
"magic" method
Get a closure to perform sync operations on behalf of a provider's
"magic" method
Returns null if:
- the {@see SyncIntrospector} was not created for a
{@see SyncProviderInterface},
- the {@see SyncProviderInterface} class already has
$method , or
-
$method doesn't resolve to an unambiguous sync operation on a
{@see SyncEntityInterface} class serviced by the
{@see SyncProviderInterface} class
|
#
|
protected
|
getKeyTargets(
array $keys,
bool $forNewInstance,
bool $strict,
bool $normalised = false,
array $customKeys = [],
array $keyClosures = [],
): IntrospectorKeyTargets
Get a list of actions required to apply values from an array to a new or
existing instance of the class
Get a list of actions required to apply values from an array to a new or
existing instance of the class
Parameters
$forNewInstance |
If true , keys are matched with constructor
parameters if possible.
|
$strict |
If true , an exception is thrown if any keys cannot
be applied to the class.
|
$normalised |
If true , the $keys array has already been
normalised.
|
$customKeys |
An array that maps key
types to keys as they appear in $keys .
|
$keyClosures |
Normalised key => closure
|
Overrides
|
#
|