PHP Class ScriptFUSION\Porter\Porter

Afficher le fichier Open project: ScriptFUSION/Porter Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
getProvider ( string $name, string | null $tag = null ) : ScriptFUSION\Porter\Provider\Provider Gets the provider matching the specified class name and optionally a tag.
hasProvider ( string $name, string | null $tag = null ) : boolean Gets a value indicating whether the specified provider is registered.
import ( ImportSpecification $specification ) : PorterRecords Imports data according to the design of the specified import specification.
importOne ( ImportSpecification $specification ) : array | null Imports one record according to the design of the specified import specification.
registerProvider ( ScriptFUSION\Porter\Provider\Provider $provider, string | null $tag = null ) Registers the specified provider optionally identified by the specified tag.
setMapper ( ScriptFUSION\Mapper\CollectionMapper $mapper )

Private Methods

Méthode Description
applyCacheAdvice ( ScriptFUSION\Porter\Provider\Provider $provider, CacheAdvice $cacheAdvice )
createMappedRecords ( Iterator $records, RecordCollection $previous, ScriptFUSION\Mapper\Mapping $mapping )
createPorterRecords ( RecordCollection $records, ImportSpecification $specification )
createProviderRecords ( Iterator $records, ScriptFUSION\Porter\Provider\Resource\ProviderResource $resource )
fetch ( ScriptFUSION\Porter\Provider\Resource\ProviderResource $resource, CacheAdvice $cacheAdvice = null )
filter ( ProviderRecords $records, callable $predicate, $context )
getOrCreateMapper ( ) : ScriptFUSION\Mapper\CollectionMapper
getOrCreateProviderFactory ( )
hashProviderName ( string $name, string | null $tag ) : string
map ( RecordCollection $records, ScriptFUSION\Mapper\Mapping $mapping, $context )

Method Details

__construct() public méthode

public __construct ( )

getProvider() public méthode

Gets the provider matching the specified class name and optionally a tag.
public getProvider ( string $name, string | null $tag = null ) : ScriptFUSION\Porter\Provider\Provider
$name string Provider class name.
$tag string | null Optional. Provider tag.
Résultat ScriptFUSION\Porter\Provider\Provider

hasProvider() public méthode

Gets a value indicating whether the specified provider is registered.
public hasProvider ( string $name, string | null $tag = null ) : boolean
$name string Provider class name.
$tag string | null Optional. Provider tag.
Résultat boolean True if the specified provider is registered, otherwise false.

import() public méthode

Imports data according to the design of the specified import specification.
public import ( ImportSpecification $specification ) : PorterRecords
$specification ScriptFUSION\Porter\Specification\ImportSpecification Import specification.
Résultat ScriptFUSION\Porter\Collection\PorterRecords

importOne() public méthode

Imports one record according to the design of the specified import specification.
public importOne ( ImportSpecification $specification ) : array | null
$specification ScriptFUSION\Porter\Specification\ImportSpecification Import specification.
Résultat array | null Record.

registerProvider() public méthode

Registers the specified provider optionally identified by the specified tag.
public registerProvider ( ScriptFUSION\Porter\Provider\Provider $provider, string | null $tag = null )
$provider ScriptFUSION\Porter\Provider\Provider Provider.
$tag string | null Optional. Provider tag.

setMapper() public méthode

public setMapper ( ScriptFUSION\Mapper\CollectionMapper $mapper )
$mapper ScriptFUSION\Mapper\CollectionMapper