Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ReferenceIncrementalSomeIntegerPatch.php
Go to the documentation of this file.
1 <?php
7 
12 
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 '0.0.4';
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' => 'Ololo123', 'varbinary' => 0101010]);
59  }
60 
61  public function revert()
62  {
63  $adapter = $this->resourceConnection->getConnection();
64  $adapter->delete('test_table', ['`smallint` = ?' => 1]);
65  }
66 
70  public static function getDependencies()
71  {
72  return [
73  ZFirstPatch::class
74  ];
75  }
76 }
$adapter
Definition: webapi_user.php:16