You are here

protected function FeedsDataProcessor::table in Feeds 6

Return the data table for this feed.

@todo Make *Data module* throw exception when table can't be found or can't be created.

Throws

Exception $e Throws this exception if a table cannot be found and cannot be created.

File

plugins/FeedsDataProcessor.inc, line 297
Definition of FeedsDataProcessor.

Class

FeedsDataProcessor
Creates simple table records from feed items. Uses Data module.

Code

protected function table() {
  if ($table = data_get_table($this
    ->tableName())) {
    return $table;
  }
  else {
    if ($table = data_create_table($this
      ->tableName(), $this
      ->baseSchema(), feeds_importer($this->id)->config['name'])) {
      return $table;
    }
  }
  throw new Exception(t('Could not create data table.'));
}