1 | <?php |
||
20 | class Insert extends Common\Insert implements ReturningInterface |
||
21 | { |
||
22 | use ReturningTrait; |
||
23 | |||
24 | 7 | protected function build() |
|
29 | |||
30 | /** |
||
31 | * |
||
32 | * Returns the proper name for passing to `PDO::lastInsertId()`. |
||
33 | * |
||
34 | * @param string $col The last insert ID column. |
||
35 | * |
||
36 | * @return string The sequence name "{$into_table}_{$col}_seq", or the |
||
37 | * value from `$last_insert_id_names`. |
||
38 | * |
||
39 | */ |
||
40 | 2 | public function getLastInsertIdName($col) |
|
48 | } |
||
49 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: