src/Extension.php
public function load(ContainerBuilder $container, array $config)
    {
        if (isset($config['connection_details'])) {
            DEFINE('SQLDBENGINE', $config['connection_details']['engine']);
            DEFINE('SQLDBHOST', $config['connection_details']['host']);
            DEFINE('SQLDBSCHEMA', $config['connection_details']['schema']);
            DEFINE('SQLDBNAME', $config['connection_details']['dbname']);
            DEFINE('SQLDBUSERNAME', $config['connection_details']['username']);
            DEFINE('SQLDBPASSWORD', $config['connection_details']['password']);
            DEFINE('SQLDBPREFIX', $config['connection_details']['dbprefix']);
            session_start();
            // Store any keywords set in behat.yml file
            if (isset($config['keywords']) and $config['keywords']) {
                foreach ($config['keywords'] as $keyword => $value) {
                    $_SESSION['behat']['GenesisSqlExtension']['keywords'][$keyword] = $value;
                }
            }

            // Set 'notQuotableKeywords' for later use.
            $_SESSION['behat']['GenesisSqlExtension']['notQuotableKeywords'] = [];

            if (isset($config['notQuotableKeywords'])) {
                $_SESSION['behat']['GenesisSqlExtension']['notQuotableKeywords'] = $config['notQuotableKeywords'];
            }
        }
    }
public function load(ContainerBuilder $container, array $config)
    {
        if (isset($config['connection_details'])) {
            DEFINE('SQLDBENGINE', $config['connection_details']['engine']);
            DEFINE('SQLDBHOST', $config['connection_details']['host']);
            DEFINE('SQLDBSCHEMA', $config['connection_details']['schema']);
            DEFINE('SQLDBNAME', $config['connection_details']['dbname']);
            DEFINE('SQLDBUSERNAME', $config['connection_details']['username']);
            DEFINE('SQLDBPASSWORD', $config['connection_details']['password']);
            DEFINE('SQLDBPREFIX', $config['connection_details']['dbprefix']);
            session_start();
            // Store any keywords set in behat.yml file
            if (isset($config['keywords']) and $config['keywords']) {
                foreach ($config['keywords'] as $keyword => $value) {
                    $_SESSION['behat']['GenesisSqlExtension']['keywords'][$keyword] = $value;
                }
            }

            // Set 'notQuotableKeywords' for later use.
            $_SESSION['behat']['GenesisSqlExtension']['notQuotableKeywords'] = [];

            if (isset($config['notQuotableKeywords'])) {
                $_SESSION['behat']['GenesisSqlExtension']['notQuotableKeywords'] = $config['notQuotableKeywords'];
            }
        }
    }
public function load ( ContainerBuilder $ container , array $ config ) { if ( isset ( $ config [ 'connection_details' ] ) ) { DEFINE ( 'SQLDBENGINE' , $ config [ 'connection_details' ] [ 'engine' ] ) ; DEFINE ( 'SQLDBHOST' , $ config [ 'connection_details' ] [ 'host' ] ) ; DEFINE ( 'SQLDBSCHEMA' , $ config [ 'connection_details' ] [ 'schema' ] ) ; DEFINE ( 'SQLDBNAME' , $ config [ 'connection_details' ] [ 'dbname' ] ) ; DEFINE ( 'SQLDBUSERNAME' , $ config [ 'connection_details' ] [ 'username' ] ) ; DEFINE ( 'SQLDBPASSWORD' , $ config [ 'connection_details' ] [ 'password' ] ) ; DEFINE ( 'SQLDBPREFIX' , $ config [ 'connection_details' ] [ 'dbprefix' ] ) ; session_start ( ) ; // Store any keywords set in behat.yml file if ( isset ( $ config [ 'keywords' ] ) and $ config [ 'keywords' ] ) { foreach ( $ config [ 'keywords' ] as $ keyword => $ value ) { $ _SESSION [ 'behat' ] [ 'GenesisSqlExtension' ] [ 'keywords' ] [ $ keyword ] = $ value ; } } // Set 'notQuotableKeywords' for later use. $ _SESSION [ 'behat' ] [ 'GenesisSqlExtension' ] [ 'notQuotableKeywords' ] = [ ] ; if ( isset ( $ config [ 'notQuotableKeywords' ] ) ) { $ _SESSION [ 'behat' ] [ 'GenesisSqlExtension' ] [ 'notQuotableKeywords' ] = $ config [ 'notQuotableKeywords' ] ; } } }
Load and set the configuration options.
Load and set the configuration options .