public static function create($table, Dsn $dsn = null) { if (!$dsn) { $dsn = new Dsn(Config::driver(), Config::dsn()); } $adapter = TableAdapterFactory::instance()->createTableAdapter($dsn, $table); return new TableGateway($adapter); }