PHP Класс ScriptFUSION\Porter\Porter

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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 )

Приватные методы

Метод Описание
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 )

Описание методов

__construct() публичный Метод

public __construct ( )

getProvider() публичный Метод

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.
Результат ScriptFUSION\Porter\Provider\Provider

hasProvider() публичный Метод

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.
Результат boolean True if the specified provider is registered, otherwise false.

import() публичный Метод

Imports data according to the design of the specified import specification.
public import ( ImportSpecification $specification ) : PorterRecords
$specification ScriptFUSION\Porter\Specification\ImportSpecification Import specification.
Результат ScriptFUSION\Porter\Collection\PorterRecords

importOne() публичный Метод

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.
Результат array | null Record.

registerProvider() публичный Метод

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 setMapper ( ScriptFUSION\Mapper\CollectionMapper $mapper )
$mapper ScriptFUSION\Mapper\CollectionMapper