public static function Load($n = null, $id = 1, $k = 'id') { $one = is_array($id) ? false : true; $row = self::Fetch($n, $id, $k); if ($one) { if ($row) { $table = new Table($n, $row); $table->_set_pk($k, $id); return $table; } return null; } else { $tables = array(); if ($row) { foreach ($row as $r) { $table = new Table($n, $r); $table->_set_pk($k, $r[$k]); $tables[$one[$k]] = $table; } } return $tables; } }