src/Slashworks/BackendBundle/Helper/InstallHelper.php
private static function _saveSystemConfig()
        {

            $sYmlDump = array(
                'parameters' => array(
                    'database_driver'   => self::checkEmpty(self::$_data['dbDriver']),
                    'database_host'     => self::checkEmpty(self::$_data['dbHost']),
                    'database_port'     => self::checkEmpty(self::$_data['dbPort']),
                    'database_name'     => self::checkEmpty(self::$_data['dbName']),
                    'database_user'     => self::checkEmpty(self::$_data['dbUser']),
                    'database_password' => self::checkEmpty(self::$_data['dbPassword']),
                    'mailer_transport'  => self::checkEmpty(self::$_data['mailerTransport']),
                    'mailer_host'       => self::checkEmpty(self::$_data['mailerHost']),
                    'mailer_user'       => self::checkEmpty(self::$_data['mailerUser']),
                    'mailer_password'   => self::checkEmpty(self::$_data['mailerPassword']),
                    'locale'            => 'de',
                    'secret'            => md5(uniqid(null, true)),
                ),
            );


            $oDumper = new Dumper();
            $sYaml   = $oDumper->dump($sYmlDump, 99, 0, true, false);
            $sAppPath = self::$_container->get('kernel')->getRootDir();
            $sPath   = $sAppPath. '/config/parameters.yml';
            $sYaml   = str_replace("'", '', $sYaml);
            file_put_contents($sPath, $sYaml);
        }
private static function _saveSystemConfig()
        {

            $sYmlDump = array(
                'parameters' => array(
                    'database_driver'   => self::checkEmpty(self::$_data['dbDriver']),
                    'database_host'     => self::checkEmpty(self::$_data['dbHost']),
                    'database_port'     => self::checkEmpty(self::$_data['dbPort']),
                    'database_name'     => self::checkEmpty(self::$_data['dbName']),
                    'database_user'     => self::checkEmpty(self::$_data['dbUser']),
                    'database_password' => self::checkEmpty(self::$_data['dbPassword']),
                    'mailer_transport'  => self::checkEmpty(self::$_data['mailerTransport']),
                    'mailer_host'       => self::checkEmpty(self::$_data['mailerHost']),
                    'mailer_user'       => self::checkEmpty(self::$_data['mailerUser']),
                    'mailer_password'   => self::checkEmpty(self::$_data['mailerPassword']),
                    'locale'            => 'de',
                    'secret'            => md5(uniqid(null, true)),
                ),
            );


            $oDumper = new Dumper();
            $sYaml   = $oDumper->dump($sYmlDump, 99, 0, true, false);
            $sAppPath = self::$_container->get('kernel')->getRootDir();
            $sPath   = $sAppPath. '/config/parameters.yml';
            $sYaml   = str_replace("'", '', $sYaml);
            file_put_contents($sPath, $sYaml);
        }
private static function _saveSystemConfig ( ) { $ sYmlDump = array ( 'parameters' => array ( 'database_driver' => self :: checkEmpty ( self :: $ _data [ 'dbDriver' ] ) , 'database_host' => self :: checkEmpty ( self :: $ _data [ 'dbHost' ] ) , 'database_port' => self :: checkEmpty ( self :: $ _data [ 'dbPort' ] ) , 'database_name' => self :: checkEmpty ( self :: $ _data [ 'dbName' ] ) , 'database_user' => self :: checkEmpty ( self :: $ _data [ 'dbUser' ] ) , 'database_password' => self :: checkEmpty ( self :: $ _data [ 'dbPassword' ] ) , 'mailer_transport' => self :: checkEmpty ( self :: $ _data [ 'mailerTransport' ] ) , 'mailer_host' => self :: checkEmpty ( self :: $ _data [ 'mailerHost' ] ) , 'mailer_user' => self :: checkEmpty ( self :: $ _data [ 'mailerUser' ] ) , 'mailer_password' => self :: checkEmpty ( self :: $ _data [ 'mailerPassword' ] ) , 'locale' => 'de' , 'secret' => md5 ( uniqid ( null , true ) ) , ) , ) ; $ oDumper = new Dumper ( ) ; $ sYaml = $ oDumper -> dump ( $ sYmlDump , 99 , 0 , true , false ) ; $ sAppPath = self :: $ _container -> get ( 'kernel' ) -> getRootDir ( ) ; $ sPath = $ sAppPath . '/config/parameters.yml' ; $ sYaml = str_replace ( "'" , '' , $ sYaml ) ; file_put_contents ( $ sPath , $ sYaml ) ; }
save systemconfig to parameters.yml
save systemconfig to parameters . yml