Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Timestamp.php
Go to the documentation of this file.
1 <?php
7 
11 
17 class Timestamp extends Column implements
21 {
25  private $default;
26 
30  private $onUpdate;
31 
35  private $nullable;
36 
49  public function __construct(
50  string $name,
51  string $type,
52  Table $table,
53  string $default,
54  bool $nullable = true,
55  string $onUpdate = null,
56  string $comment = null,
57  string $onCreate = null
58  ) {
59  parent::__construct($name, $type, $table, $comment, $onCreate);
60  $this->default = $default;
61  $this->onUpdate = $onUpdate;
62  $this->nullable = $nullable;
63  }
64 
70  public function getDefault()
71  {
72  return $this->default;
73  }
74 
80  public function getOnUpdate()
81  {
82  return $this->onUpdate;
83  }
84 
88  public function getDiffSensitiveParams()
89  {
90  return [
91  'type' => $this->getType(),
92  'default' => $this->getDefault(),
93  'onUpdate' => $this->getOnUpdate(),
94  'comment' => $this->getComment()
95  ];
96  }
97 
101  public function isNullable(): bool
102  {
103  return $this->nullable;
104  }
105 }
$type
Definition: item.phtml:13
__construct(string $name, string $type, Table $table, string $default, bool $nullable=true, string $onUpdate=null, string $comment=null, string $onCreate=null)
Definition: Timestamp.php:49
$table
Definition: trigger.php:14
if(!isset($_GET['name'])) $name
Definition: log.php:14