src/Controller/Plugin/YawikConfigCreator.php
public function process($dbConn, $email)
    {
        // extract database
        $dbName = $this->dbNameExctractor->filter($dbConn);

        $config = array(
            'doctrine' => array(
                'connection'    => array(
                    'odm_default' => array(
                        'connectionString' => $dbConn,
                    ),
                ),
                'configuration' => array(
                    'odm_default' => array(
                        'default_db' => $dbName,
                    ),
                ),
            ),

            'core_options' => array(
                'system_message_email' => $email,
            ),
        );

        $content = $this->generateConfigContent($config);
        $ok      = $this->writeConfigFile($content);

        return $ok ? true : $content;
    }
public function process($dbConn, $email)
    {
        // extract database
        $dbName = $this->dbNameExctractor->filter($dbConn);

        $config = array(
            'doctrine' => array(
                'connection'    => array(
                    'odm_default' => array(
                        'connectionString' => $dbConn,
                    ),
                ),
                'configuration' => array(
                    'odm_default' => array(
                        'default_db' => $dbName,
                    ),
                ),
            ),

            'core_options' => array(
                'system_message_email' => $email,
            ),
        );

        $content = $this->generateConfigContent($config);
        $ok      = $this->writeConfigFile($content);

        return $ok ? true : $content;
    }
public function process ( $ dbConn , $ email ) { // extract database $ dbName = $ this -> dbNameExctractor -> filter ( $ dbConn ) ; $ config = array ( 'doctrine' => array ( 'connection' => array ( 'odm_default' => array ( 'connectionString' => $ dbConn , ) , ) , 'configuration' => array ( 'odm_default' => array ( 'default_db' => $ dbName , ) , ) , ) , 'core_options' => array ( 'system_message_email' => $ email , ) , ) ; $ content = $ this -> generateConfigContent ( $ config ) ; $ ok = $ this -> writeConfigFile ( $ content ) ; return $ ok ? true : $ content ; }
Generates a configuration file.

@param string $dbConn
@param string $email

@return bool|string
Generates a configuration file .