original_string: public function getSource($sourceData)
      {
          if (is_array($sourceData)) {
              $sourceId = $sourceData['gso_id_source'];
          } else {
              $sourceId   = $sourceData;
              $sourceData = false;
          }
  
          if (! isset($this->_sources[$sourceId])) {
              if (! $sourceData) {
  
                  $sourceData = $this->db->fetchRow("SELECT * FROM gems__sources WHERE gso_id_source = ?", $sourceId);
              }
  
              if (! isset($sourceData['gso_ls_class'])) {
                  throw new \Gems_Exception_Coding('Missing source class for source ID: ' . $sourceId);
              }
  
              $this->_sources[$sourceId] = $this->_loadClass('source_' . $sourceData['gso_ls_class'], true, array($sourceData, $this->db));
          }
  
          return $this->_sources[$sourceId];
      }
code: public function getSource($sourceData)
      {
          if (is_array($sourceData)) {
              $sourceId = $sourceData['gso_id_source'];
          } else {
              $sourceId   = $sourceData;
              $sourceData = false;
          }
  
          if (! isset($this->_sources[$sourceId])) {
              if (! $sourceData) {
  
                  $sourceData = $this->db->fetchRow("SELECT * FROM gems__sources WHERE gso_id_source = ?", $sourceId);
              }
  
              if (! isset($sourceData['gso_ls_class'])) {
                  throw new \Gems_Exception_Coding('Missing source class for source ID: ' . $sourceId);
              }
  
              $this->_sources[$sourceId] = $this->_loadClass('source_' . $sourceData['gso_ls_class'], true, array($sourceData, $this->db));
          }
  
          return $this->_sources[$sourceId];
      }
code_tokens: public function getSource ( $ sourceData ) { if ( is_array ( $ sourceData ) ) { $ sourceId = $ sourceData [ 'gso_id_source' ] ; } else { $ sourceId = $ sourceData ; $ sourceData = false ; } if ( ! isset ( $ this -> _sources [ $ sourceId ] ) ) { if ( ! $ sourceData ) { $ sourceData = $ this -> db -> fetchRow ( "SELECT * FROM gems__sources WHERE gso_id_source = ?" , $ sourceId ) ; } if ( ! isset ( $ sourceData [ 'gso_ls_class' ] ) ) { throw new \ Gems_Exception_Coding ( 'Missing source class for source ID: ' . $ sourceId ) ; } $ this -> _sources [ $ sourceId ] = $ this -> _loadClass ( 'source_' . $ sourceData [ 'gso_ls_class' ] , true , array ( $ sourceData , $ this -> db ) ) ; } return $ this -> _sources [ $ sourceId ] ; }
docstring: Retrieve a SourceInterface with a given id
  
  Should only be called by \Gems_Tracker, \Gems_Tracker_Survey or \Gems_Tracker_Token (or should
  this one use \Gems_Tracker_Survey instead?)
  
  @param mixed $sourceData Gems source id or array containing gems source data
  @return \Gems_Tracker_Source_SourceInterface
docstring_tokens: Retrieve a SourceInterface with a given id