Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Schema.php
Go to the documentation of this file.
1 <?php
7 
9 
15 class Schema
16 {
22  private $resourceConnection;
23 
29  private $tables;
30 
36  public function __construct(ResourceConnection $resourceConnection)
37  {
38  $this->resourceConnection = $resourceConnection;
39  $this->tables = [];
40  }
41 
47  public function getTables()
48  {
49  return $this->tables;
50  }
51 
58  public function addTable(Table $table)
59  {
60  $this->tables[$table->getName()] = $table;
61  return $this;
62  }
63 
71  public function getTableByName($name)
72  {
73  $name = $this->resourceConnection->getTableName($name);
74  return isset($this->tables[$name]) ? $this->tables[$name] : false;
75  }
76 }
$table
Definition: trigger.php:14
__construct(ResourceConnection $resourceConnection)
Definition: Schema.php:36
if(!isset($_GET['name'])) $name
Definition: log.php:14