src/Adapter/CsvImportAdapter.php
/**
     * Overwrites the default CSV configuration values with the one from the passed configuration.
     *
     * @param \TechDivision\Import\Configuration\Subject\ImportAdapterConfigurationInterface $importAdapterConfiguration The configuration to use the values from
     * @param \TechDivision\Import\Serializer\SerializerFactoryInterface                     $serializerFactory          The serializer factory instance
     *
     * @return void
     */
Overwrites the default CSV configuration values with the one from the passed configuration.

@return void
Overwrites the default CSV configuration values with the one from the passed configuration . @return void
public function init(
        ImportAdapterConfigurationInterface $importAdapterConfiguration,
        SerializerFactoryInterface $serializerFactory
    ) {
        $config = $this->lexer->getConfig();
        if ($delimiter = $importAdapterConfiguration->getDelimiter()) {
            $config->setDelimiter($delimiter);
        }
        if ($escape = $importAdapterConfiguration->getEscape()) {
            $config->setEscape($escape);
        }
        if ($enclosure = $importAdapterConfiguration->getEnclosure()) {
            $config->setEnclosure($enclosure);
        }
        if ($fromCharset = $importAdapterConfiguration->getFromCharset()) {
            $config->setFromCharset($fromCharset);
        }
        if ($toCharset = $importAdapterConfiguration->getToCharset()) {
            $config->setToCharset($toCharset);
        }
        $this->setSerializer($serializerFactory->createSerializer($importAdapterConfiguration));
    }
public function init ( ImportAdapterConfigurationInterface $ importAdapterConfiguration , SerializerFactoryInterface $ serializerFactory ) { $ config = $ this -> lexer -> getConfig ( ) ; if ( $ delimiter = $ importAdapterConfiguration -> getDelimiter ( ) ) { $ config -> setDelimiter ( $ delimiter ) ; } if ( $ escape = $ importAdapterConfiguration -> getEscape ( ) ) { $ config -> setEscape ( $ escape ) ; } if ( $ enclosure = $ importAdapterConfiguration -> getEnclosure ( ) ) { $ config -> setEnclosure ( $ enclosure ) ; } if ( $ fromCharset = $ importAdapterConfiguration -> getFromCharset ( ) ) { $ config -> setFromCharset ( $ fromCharset ) ; } if ( $ toCharset = $ importAdapterConfiguration -> getToCharset ( ) ) { $ config -> setToCharset ( $ toCharset ) ; } $ this -> setSerializer ( $ serializerFactory -> createSerializer ( $ importAdapterConfiguration ) ) ; }
Overwrites the default CSV configuration values with the one from the passed configuration.
Overwrites the default CSV configuration values with the one from the passed configuration .
// load the lexer configuration and overwrite the values /** @var \Goodby\CSV\Import\Standard\LexerConfig $config */ // query whether or not a delimiter character has been configured // query whether or not a custom escape character has been configured // query whether or not a custom enclosure character has been configured // query whether or not a custom source charset has been configured // query whether or not a custom target charset has been configured // load the serializer instance from the DI container and set it on the subject instance