Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SomePatch.php
Go to the documentation of this file.
1 <?php
7 
12 
17 class SomePatch implements
21 {
25  private $resourceConnection;
26 
31  public function __construct(ResourceConnection $resourceConnection)
32  {
33  $this->resourceConnection = $resourceConnection;
34  }
35 
39  public static function getVersion()
40  {
41  return '1.0.5';
42  }
43 
47  public function getAliases()
48  {
49  return [];
50  }
51 
55  public function apply()
56  {
57  $adapter = $this->resourceConnection->getConnection();
58  $adapter->insert('test_table', ['varchar' => "_ref", 'varbinary' => 0101010]);
59  }
60 
61  public function revert()
62  {
63  }
64 
68  public static function getDependencies()
69  {
70  return [];
71  }
72 }
$adapter
Definition: webapi_user.php:16
__construct(ResourceConnection $resourceConnection)
Definition: SomePatch.php:31