PHP 클래스 ScriptFUSION\Porter\Porter

파일 보기 프로젝트 열기: ScriptFUSION/Porter 1 사용 예제들

공개 메소드들

메소드 설명
__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