Components/FileService/Csv/CsvConfigurableStepsProvider.php
protected function copyFile(array &$stepActionParams, array &$endpointOptions, array &$context)
    {
        $rootPath = $this->getRootPath($endpointOptions, $stepActionParams);

        $stepParamsResolver = new OptionsResolver();
        $stepParamsResolver->setRequired([
            self::PARAM_FILE_NAME,
            self::PARAM_NEW_FILE_PATH,
        ]);
        $params = $stepParamsResolver->resolve($stepActionParams);

        $newFilePath = $params[self::PARAM_NEW_FILE_PATH];
        $newFullPath = $rootPath.DIRECTORY_SEPARATOR.$newFilePath;

        $originalFilePath = $params[self::PARAM_FILE_NAME];
        $originalFullPath = $rootPath.DIRECTORY_SEPARATOR.$originalFilePath;

        copy($originalFullPath, $newFullPath);
    }
protected function copyFile(array &$stepActionParams, array &$endpointOptions, array &$context)
    {
        $rootPath = $this->getRootPath($endpointOptions, $stepActionParams);

        $stepParamsResolver = new OptionsResolver();
        $stepParamsResolver->setRequired([
            self::PARAM_FILE_NAME,
            self::PARAM_NEW_FILE_PATH,
        ]);
        $params = $stepParamsResolver->resolve($stepActionParams);

        $newFilePath = $params[self::PARAM_NEW_FILE_PATH];
        $newFullPath = $rootPath.DIRECTORY_SEPARATOR.$newFilePath;

        $originalFilePath = $params[self::PARAM_FILE_NAME];
        $originalFullPath = $rootPath.DIRECTORY_SEPARATOR.$originalFilePath;

        copy($originalFullPath, $newFullPath);
    }
protected function copyFile ( array & $ stepActionParams , array & $ endpointOptions , array & $ context ) { $ rootPath = $ this -> getRootPath ( $ endpointOptions , $ stepActionParams ) ; $ stepParamsResolver = new OptionsResolver ( ) ; $ stepParamsResolver -> setRequired ( [ self :: PARAM_FILE_NAME , self :: PARAM_NEW_FILE_PATH , ] ) ; $ params = $ stepParamsResolver -> resolve ( $ stepActionParams ) ; $ newFilePath = $ params [ self :: PARAM_NEW_FILE_PATH ] ; $ newFullPath = $ rootPath . DIRECTORY_SEPARATOR . $ newFilePath ; $ originalFilePath = $ params [ self :: PARAM_FILE_NAME ] ; $ originalFullPath = $ rootPath . DIRECTORY_SEPARATOR . $ originalFilePath ; copy ( $ originalFullPath , $ newFullPath ) ; }
Copy a file for this producer.

Required Params:
- CsvConfigurableProducer::PARAM_NEW_FILE_PATH
Optional Params:
- CsvConfigurableProducer::PARAM_FILE_NAME

@param array $stepActionParams
@param array $endpointOptions
@param array $context
Copy a file for this producer .