You are here

public static function DataTable::instance in Data 6

Same name and namespace in other branches
  1. 7 includes/DataTable.inc \DataTable::instance()

Instiate a DataTable object. Use this function instead of new DataTable.

3 calls to DataTable::instance()
data_create_table in ./data.module
Create a table.
data_get_table in ./data.module
Get a table if it exists.
data_ui_adopt_form_submit in data_ui/data_ui.admin.inc
Submit handler for adopt table form.

File

includes/DataTable.inc, line 47
Contains class definition for DataTable.

Class

DataTable
Manages data access and manipulation for a single data table. Use data_create_table() or data_get_table() to instantiate an object from this class.

Code

public static function instance($name) {
  static $tables;
  if (!isset($tables[$name])) {
    $tables[$name] = new DataTable($name);
  }
  return $tables[$name];
}