public static function create( ConfigurationBuilder $builder  )
	{
		// TODO Currently only supports PHP files, need to add optional json and yaml support.

		$configPath = Framework::fw()->buildPath( '__config' );
		$configFile = $configPath . __ . $builder->key() . ".php";

		if ( file_put_contents( $configFile, $builder->toPhp( true ) ) === false || !is_array( $data = include( $configFile ) ) )
		{
			@unlink( $configFile );

			throw new FrameworkException( "Configuration error, either failed to write config file to [" . $configFile . "] or returned data is not an array." );
		}

		Framework::config()->set( $builder->key(), $data );
	}
public static function create( ConfigurationBuilder $builder  )
	{
		// TODO Currently only supports PHP files, need to add optional json and yaml support.

		$configPath = Framework::fw()->buildPath( '__config' );
		$configFile = $configPath . __ . $builder->key() . ".php";

		if ( file_put_contents( $configFile, $builder->toPhp( true ) ) === false || !is_array( $data = include( $configFile ) ) )
		{
			@unlink( $configFile );

			throw new FrameworkException( "Configuration error, either failed to write config file to [" . $configFile . "] or returned data is not an array." );
		}

		Framework::config()->set( $builder->key(), $data );
	}
public static function create ( ConfigurationBuilder $ builder ) { // TODO Currently only supports PHP files, need to add optional json and yaml support. $ configPath = Framework :: fw ( ) -> buildPath ( '__config' ) ; $ configFile = $ configPath . __ . $ builder -> key ( ) . ".php" ; if ( file_put_contents ( $ configFile , $ builder -> toPhp ( true ) ) === false || ! is_array ( $ data = include ( $ configFile ) ) ) { @ unlink ( $ configFile ) ; throw new FrameworkException ( "Configuration error, either failed to write config file to [" . $ configFile . "] or returned data is not an array." ) ; } Framework :: config ( ) -> set ( $ builder -> key ( ) , $ data ) ; }
Saves a builder to the filesystem

@param ConfigurationBuilder $builder

@throws FrameworkException
Saves a builder to the filesystem