classes/Input/EncodingProviders/EncodingProvider.php
protected function mergeConfigWithDefaults($preset)
    {
        // Get the preset settings
        if (!$settings = Config::get('decoy.encode.presets.'.$preset.'.settings')) {
            throw new Exception('Encoding preset not found: '.$preset);
        }

        // If the settings are an assoc array, then there is only one output and it
        // needs to be wrapped in an array
        if (!is_numeric(array_keys($settings)[0])) {
            $settings = ['mp4' => $settings];
        }

        // Merge defaults with each output in the settings
        return array_map(function ($output) {
            return array_merge($this->defaults, $output);
        }, $settings);
    }
protected function mergeConfigWithDefaults($preset)
    {
        // Get the preset settings
        if (!$settings = Config::get('decoy.encode.presets.'.$preset.'.settings')) {
            throw new Exception('Encoding preset not found: '.$preset);
        }

        // If the settings are an assoc array, then there is only one output and it
        // needs to be wrapped in an array
        if (!is_numeric(array_keys($settings)[0])) {
            $settings = ['mp4' => $settings];
        }

        // Merge defaults with each output in the settings
        return array_map(function ($output) {
            return array_merge($this->defaults, $output);
        }, $settings);
    }
protected function mergeConfigWithDefaults ( $ preset ) { // Get the preset settings if ( ! $ settings = Config :: get ( 'decoy.encode.presets.' . $ preset . '.settings' ) ) { throw new Exception ( 'Encoding preset not found: ' . $ preset ) ; } // If the settings are an assoc array, then there is only one output and it // needs to be wrapped in an array if ( ! is_numeric ( array_keys ( $ settings ) [ 0 ] ) ) { $ settings = [ 'mp4' => $ settings ] ; } // Merge defaults with each output in the settings return array_map ( function ( $ output ) { return array_merge ( $ this -> defaults , $ output ) ; } , $ settings ) ; }
Update the default configwith the user config

@param  string $preset
@return array

@throws Exception
Update the default configwith the user config