Tripal
Public Member Functions | List of all members
Drupal\Tests\tripal\Kernel\TripalDBX\Subclass\TripalDbxConnectionFake Class Reference
Inheritance diagram for Drupal\Tests\tripal\Kernel\TripalDBX\Subclass\TripalDbxConnectionFake:
Inheritance graph
[legend]
Collaboration diagram for Drupal\Tests\tripal\Kernel\TripalDBX\Subclass\TripalDbxConnectionFake:
Collaboration graph
[legend]

Public Member Functions

 findVersion (?string $schema_name=NULL, bool $exact_version=FALSE)
 
 getAvailableInstances ()
 
 getTripalDbxClass ($class)
 
- Public Member Functions inherited from Drupal\tripal\TripalDBX\TripalDbxConnection
 __construct (string $schema_name='', $database='default', ?\Drupal\tripal\Services\TripalLogger $logger=NULL)
 
 getDatabaseName ()
 
 getDatabaseKey ()
 
 getMessageLogger ()
 
 setMessageLogger (\Drupal\tripal\Services\TripalLogger $logger)
 
 schema ()
 
 setSchemaName (string $schema_name)
 
 getSchemaName ()
 
 getQuotedSchemaName ()
 
 getExtraSchemas ()
 
 clearExtraSchemas ()
 
 addExtraSchema (string $schema_name)
 
 setExtraSchema (string $schema_name, int $index=2)
 
 getVersion ()
 
 useTripalDbxSchemaFor ($object_or_class)
 
 useDrupalSchemaFor ($object_or_class)
 
 shouldUseTripalDbxSchema ()
 
 prefixTables ($sql)
 
 tablePrefix ( $table='default', bool $use_tdbx_schema=FALSE)
 
 getPrefix ()
 
 executeSqlQueries (string $sql_queries, $search_path_mode=FALSE, ?string $schema_name=NULL)
 
 executeSqlFile (string $sql_file_path, $search_path_mode=FALSE, ?string $schema_name=NULL)
 
 escapeTable ($table)
 
 getListClassesUsingTripalDbx ()
 
 __toString ()
 

Additional Inherited Members

- Protected Member Functions inherited from Drupal\tripal\TripalDBX\TripalDbxConnection
 getDefaultSchemaName (?string $schema_name=NULL, string $error_message='')
 
- Static Protected Member Functions inherited from Drupal\tripal\TripalDBX\TripalDbxConnection
static openNewPdoConnection (\Drupal\Core\Database\Connection $database)
 
- Protected Attributes inherited from Drupal\tripal\TripalDBX\TripalDbxConnection
 $identifierQuotes
 
 $database = NULL
 
 $databaseName = ''
 
 $dbKey = ''
 
 $usedSchemas = []
 
 $version = NULL
 
 $messageLogger = NULL
 
 $tripalDbxApi = NULL
 
 $objectsUsingTripalDbx = []
 
 $classesUsingTripalDbx = []
 

Detailed Description

Fake connection class.

Member Function Documentation

◆ findVersion()

Drupal\Tests\tripal\Kernel\TripalDBX\Subclass\TripalDbxConnectionFake::findVersion ( ?string  $schema_name = NULL,
bool  $exact_version = FALSE 
)

{Returns the version number of the given Tripal DBX managed schema.

Parameters
?string$schema_name A schema name or NULL to work on current schema.
bool$exact_versionReturns the most precise version available. Default: FALSE.
Returns
string The version in a simple format like '1.0', '2.3x' or '4.5+' or '0' if the version cannot be guessed but an instance of the Tripal DBX managed schema has been detected or an empty string if the schema does not appear to be an instance of the Tripal DBX managed schema. If $exact_version is FALSE , the returned version must always starts by a number and can be tested against numeric values (ie. ">= 1.2"). If $exact_version is TRUE, the format is free and can start by a letter and hold several dots like 'v1.2.3 alpha'.
}

Reimplemented from Drupal\tripal\TripalDBX\TripalDbxConnection.

◆ getAvailableInstances()

Drupal\Tests\tripal\Kernel\TripalDBX\Subclass\TripalDbxConnectionFake::getAvailableInstances ( )

{Get the list of available "Tripal DBX Managed schema" instances in current database.This function returns both PostgreSQL schemas integrated with Tripal and free schemas.

Returns
array An array of available schema keyed by schema name and having the following structure: "schema_name": name of the schema (same as the key); "version": detected version of the Tripal DBX managed schema; "is_test": TRUE if it is a test schema and FALSE otherwise; "has_data": TRUE if the schema contains more than just default records; "size": size of the schema in bytes; "is_integrated": FALSE if not integrated with Tripal and an array otherwise with the following fields: 'install_id', 'schema_name', 'version', 'created', 'updated'.
}

Reimplemented from Drupal\tripal\TripalDBX\TripalDbxConnection.

◆ getTripalDbxClass()

Drupal\Tests\tripal\Kernel\TripalDBX\Subclass\TripalDbxConnectionFake::getTripalDbxClass (   $class)

{Gets the Tripal DBX-specific class for the specified category.Returns the Tripal DBX-specific override class if any for the specified class category.

Parameters
string$classThe class category for which we want the specific class.
Returns
string The name of the class that should be used.
}

Reimplemented from Drupal\tripal\TripalDBX\TripalDbxConnection.


The documentation for this class was generated from the following file: