Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
SetupInterface Interface Reference
Inheritance diagram for SetupInterface:
Setup ModuleDataSetupInterface SchemaSetupInterface DataSetup Setup DataSetup Setup

Public Member Functions

 getConnection ()
 
 setTable ($tableName, $realTableName)
 
 getTable ($tableName)
 
 getTablePlaceholder ($tableName)
 
 tableExists ($table)
 
 run ($sql)
 
 startSetup ()
 
 endSetup ()
 

Detailed Description

DB resource interface

@api

Since
100.0.2

Definition at line 14 of file SetupInterface.php.

Member Function Documentation

◆ endSetup()

endSetup ( )

Prepares database after install/upgrade

Returns
$this

Implemented in Setup.

◆ getConnection()

getConnection ( )

Gets connection object

Returns
\Magento\Framework\DB\Adapter\AdapterInterface

◆ getTable()

getTable (   $tableName)

Gets table name (validated by db adapter) by table placeholder

Parameters
string | array$tableName
Returns
string

◆ getTablePlaceholder()

getTablePlaceholder (   $tableName)

Gets table placeholder by table name

Parameters
string$tableName
Returns
string
Since
100.1.0

Implemented in Setup.

◆ run()

run (   $sql)

Runs plain SQL query(ies)

Parameters
string$sql
Returns
$this

Implemented in Setup.

◆ setTable()

setTable (   $tableName,
  $realTableName 
)

Adds table placeholder/table name relation

Parameters
string$tableName
string$realTableName
Returns
$this

Implemented in Setup.

◆ startSetup()

startSetup ( )

Prepares database before install/upgrade

Returns
$this

Implemented in Setup.

◆ tableExists()

tableExists (   $table)

Checks if table exists

Parameters
string$table
Returns
bool

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