You are here

public static function DataHandler::instance in Data 6

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

Instantiate a DataHandler object.

Parameters

$table: The name of the table to access with this DataHandler object.

1 call to DataHandler::instance()
data_get_handler in ./data.module
Get Data handler for a table.

File

includes/DataHandler.inc, line 29
Definition of DataHandler class.

Class

DataHandler
Simple access methods to table data. Can be used on any table, not just Data managed tables.

Code

public static function instance($table) {
  static $handlers;
  if (!isset($handlers[$table])) {
    $handlers[$table] = new DataHandler($table);
  }
  return $handlers[$table];
}