class ImportHandler

Class ImportHandler

Methods

__construct( EventDispatcherInterface $eventDispatcher, SerializerManager $serializerManager, ArchiverManager $archiverManager, ContainerInterface $container)

Class constructor

null|Import
getImport( integer $importId, boolean $dispatchException = false)

Get import model based on given identifier

null|Import
getImportByRef( string $importRef, boolean $dispatchException = false)

Get import model based on given reference

getCategory( integer $importCategoryId, boolean $dispatchException = false)

Get import category model based on given identifier

import( Import $import, File $file, Lang $language = null)

Import

matchArchiverByExtension( string $fileName)

Match archiver relative to file name

matchSerializerByExtension( string $fileName)

Match serializer relative to file name

File
extractArchive( File $file, ArchiverInterface $archiver)

Extract archive

Details

at line 67
__construct( EventDispatcherInterface $eventDispatcher, SerializerManager $serializerManager, ArchiverManager $archiverManager, ContainerInterface $container)

Class constructor

Parameters

EventDispatcherInterface $eventDispatcher An event dispatcher interface
SerializerManager $serializerManager The serializer manager service
ArchiverManager $archiverManager The archiver manager service
ContainerInterface $container

at line 89
null|Import getImport( integer $importId, boolean $dispatchException = false)

Get import model based on given identifier

Parameters

integer $importId An import identifier
boolean $dispatchException Dispatch exception if model doesn't exist

Return Value

null|Import

Exceptions

ErrorException

at line 117
null|Import getImportByRef( string $importRef, boolean $dispatchException = false)

Get import model based on given reference

Parameters

string $importRef An import reference
boolean $dispatchException Dispatch exception if model doesn't exist

Return Value

null|Import

Exceptions

ErrorException

at line 145
null|ImportCategory getCategory( integer $importCategoryId, boolean $dispatchException = false)

Get import category model based on given identifier

Parameters

integer $importCategoryId An import category identifier
boolean $dispatchException Dispatch exception if model doesn't exist

Return Value

null|ImportCategory

Exceptions

ErrorException

at line 172
ImportEvent import( Import $import, File $file, Lang $language = null)

Import

Parameters

Import $import
File $file
Lang $language

Return Value

ImportEvent

at line 226
null|AbstractArchiver matchArchiverByExtension( string $fileName)

Match archiver relative to file name

Parameters

string $fileName File name

Return Value

null|AbstractArchiver

at line 245
null|AbstractSerializer matchSerializerByExtension( string $fileName)

Match serializer relative to file name

Parameters

string $fileName File name

Return Value

null|AbstractSerializer

at line 265
File extractArchive( File $file, ArchiverInterface $archiver)

Extract archive

Parameters

File $file
ArchiverInterface $archiver

Return Value

File First file in unarchiver