src/Model/ProcessingConfig.php
public static function initializeWithDefaultsIn(ConfigLocation $configLocation, ConfigWriter $configWriter)
    {
        $env = Environment::setUp();

        $instance = new self(['processing' => array_merge(
            $env->getConfig()->toArray(),
            [
                "connectors" => [],
                "js_ticker" => ['enabled' => false, 'interval' => 3],
            ]
        )], $configLocation);

        $configFilePath = $configLocation->toString() . DIRECTORY_SEPARATOR . self::$configFileName;

        if (file_exists($configFilePath)) {
            throw new \RuntimeException("Processing config already exists: " . $configFilePath);
        }

        $configWriter->writeNewConfigToDirectory($instance->toArray(), $configFilePath);

        $instance->recordThat(ProcessingConfigFileWasCreated::in($configLocation, self::$configFileName));

        return $instance;
    }
public static function initializeWithDefaultsIn(ConfigLocation $configLocation, ConfigWriter $configWriter)
    {
        $env = Environment::setUp();

        $instance = new self(['processing' => array_merge(
            $env->getConfig()->toArray(),
            [
                "connectors" => [],
                "js_ticker" => ['enabled' => false, 'interval' => 3],
            ]
        )], $configLocation);

        $configFilePath = $configLocation->toString() . DIRECTORY_SEPARATOR . self::$configFileName;

        if (file_exists($configFilePath)) {
            throw new \RuntimeException("Processing config already exists: " . $configFilePath);
        }

        $configWriter->writeNewConfigToDirectory($instance->toArray(), $configFilePath);

        $instance->recordThat(ProcessingConfigFileWasCreated::in($configLocation, self::$configFileName));

        return $instance;
    }
public static function initializeWithDefaultsIn ( ConfigLocation $ configLocation , ConfigWriter $ configWriter ) { $ env = Environment :: setUp ( ) ; $ instance = new self ( [ 'processing' => array_merge ( $ env -> getConfig ( ) -> toArray ( ) , [ "connectors" => [ ] , "js_ticker" => [ 'enabled' => false , 'interval' => 3 ] , ] ) ] , $ configLocation ) ; $ configFilePath = $ configLocation -> toString ( ) . DIRECTORY_SEPARATOR . self :: $ configFileName ; if ( file_exists ( $ configFilePath ) ) { throw new \ RuntimeException ( "Processing config already exists: " . $ configFilePath ) ; } $ configWriter -> writeNewConfigToDirectory ( $ instance -> toArray ( ) , $ configFilePath ) ; $ instance -> recordThat ( ProcessingConfigFileWasCreated :: in ( $ configLocation , self :: $ configFileName ) ) ; return $ instance ; }
Uses Prooph\Processing\Environment to initialize with its defaults
Uses Prooph \ Processing \ Environment to initialize with its defaults