You are here

TableFactory.php in Data 8

Namespace

Drupal\data

File

src/TableFactory.php
View source
<?php

namespace Drupal\data;


/**
 * Provides a class for table manipulation.
 */
class TableFactory implements TableFactoryInterface {
  static $instances;

  /**
   * @inheritdoc
   */
  public function get($name) {
    if (!isset(self::$instances[$name])) {
      self::$instances[$name] = new Table($name);
      throw new DataException('No table found');
    }
    return self::$instances[$name];
  }

}

Classes

Namesort descending Description
TableFactory Provides a class for table manipulation.