original_string: public function getConfig()
      {
          if ($this->config) {
              return $this->config;
          }
  
          $config = $this->getDefaultConfig();
  
          // read from database
          $result = $this->connection->fetchAll('SELECT type, class FROM fusio_provider ORDER BY class ASC');
          foreach ($result as $row) {
              $this->mergeClass($config, $row['type'], $row['class']);
          }
  
          // read from file
          if (!empty($this->file)) {
              $result = include($this->file);
  
              if (is_array($result)) {
                  foreach ($result as $type => $classes) {
                      foreach ($classes as $class) {
                          $this->mergeClass($config, $type, $class);
                      }
                  }
              }
          }
  
          return $this->config = new ProviderConfig($config);
      }
code: public function getConfig()
      {
          if ($this->config) {
              return $this->config;
          }
  
          $config = $this->getDefaultConfig();
  
          // read from database
          $result = $this->connection->fetchAll('SELECT type, class FROM fusio_provider ORDER BY class ASC');
          foreach ($result as $row) {
              $this->mergeClass($config, $row['type'], $row['class']);
          }
  
          // read from file
          if (!empty($this->file)) {
              $result = include($this->file);
  
              if (is_array($result)) {
                  foreach ($result as $type => $classes) {
                      foreach ($classes as $class) {
                          $this->mergeClass($config, $type, $class);
                      }
                  }
              }
          }
  
          return $this->config = new ProviderConfig($config);
      }
code_tokens: public function getConfig ( ) { if ( $ this -> config ) { return $ this -> config ; } $ config = $ this -> getDefaultConfig ( ) ; // read from database $ result = $ this -> connection -> fetchAll ( 'SELECT type, class FROM fusio_provider ORDER BY class ASC' ) ; foreach ( $ result as $ row ) { $ this -> mergeClass ( $ config , $ row [ 'type' ] , $ row [ 'class' ] ) ; } // read from file if ( ! empty ( $ this -> file ) ) { $ result = include ( $ this -> file ) ; if ( is_array ( $ result ) ) { foreach ( $ result as $ type => $ classes ) { foreach ( $ classes as $ class ) { $ this -> mergeClass ( $ config , $ type , $ class ) ; } } } } return $ this -> config = new ProviderConfig ( $ config ) ; }
docstring: Returns the provider config of the system
  
  @return \Fusio\Impl\Provider\ProviderConfig
docstring_tokens: Returns the provider config of the system