original_string: public static function configure($config = []) {
      $defaults = include dirname(__DIR__).'/conf/defaults.php';
      self::$config = array_replace_recursive($defaults, $config);
  
      if (isset(self::$driver)) {
        if (self::$driver->connected) {
          self::$driver->disconnect();
        }
        self::$driver = null;
      }
  
      $class = '\\Nymph\\Drivers\\'.self::$config['driver'].'Driver';
  
      $Nymph = new $class(self::$config);
      if (class_exists('\\SciActive\\Hook')) {
        \SciActive\Hook::hookObject($Nymph, 'Nymph->');
      }
      if (self::$config['pubsub']) {
        \Nymph\PubSub\HookMethods::setup();
      }
      self::$driver = $Nymph;
    }
code: public static function configure($config = []) {
      $defaults = include dirname(__DIR__).'/conf/defaults.php';
      self::$config = array_replace_recursive($defaults, $config);
  
      if (isset(self::$driver)) {
        if (self::$driver->connected) {
          self::$driver->disconnect();
        }
        self::$driver = null;
      }
  
      $class = '\\Nymph\\Drivers\\'.self::$config['driver'].'Driver';
  
      $Nymph = new $class(self::$config);
      if (class_exists('\\SciActive\\Hook')) {
        \SciActive\Hook::hookObject($Nymph, 'Nymph->');
      }
      if (self::$config['pubsub']) {
        \Nymph\PubSub\HookMethods::setup();
      }
      self::$driver = $Nymph;
    }
code_tokens: public static function configure ( $ config = [ ] ) { $ defaults = include dirname ( __DIR__ ) . '/conf/defaults.php' ; self :: $ config = array_replace_recursive ( $ defaults , $ config ) ; if ( isset ( self :: $ driver ) ) { if ( self :: $ driver -> connected ) { self :: $ driver -> disconnect ( ) ; } self :: $ driver = null ; } $ class = '\\Nymph\\Drivers\\' . self :: $ config [ 'driver' ] . 'Driver' ; $ Nymph = new $ class ( self :: $ config ) ; if ( class_exists ( '\\SciActive\\Hook' ) ) { \ SciActive \ Hook :: hookObject ( $ Nymph , 'Nymph->' ) ; } if ( self :: $ config [ 'pubsub' ] ) { \ Nymph \ PubSub \ HookMethods :: setup ( ) ; } self :: $ driver = $ Nymph ; }
docstring: Apply configuration to Nymph.
  
  $config should be an associative array of Nymph configuration. Use the
  following form:
  
  [
  'driver' => 'MySQL',
  'pubsub' => true,
  'MySql' => [
  'host' => '127.0.0.1'
  ]
  ]
  
  @param array $config An associative array of Nymph's configuration.
docstring_tokens: Apply configuration to Nymph .