1 | <?php |
||
20 | class Insert extends Common\Insert implements Common\ReturningInterface |
||
21 | { |
||
22 | 7 | protected function build() |
|
27 | |||
28 | /** |
||
29 | * |
||
30 | * Returns the proper name for passing to `PDO::lastInsertId()`. |
||
31 | * |
||
32 | * @param string $col The last insert ID column. |
||
33 | * |
||
34 | * @return string The sequence name "{$into_table}_{$col}_seq", or the |
||
35 | * value from `$last_insert_id_names`. |
||
36 | * |
||
37 | */ |
||
38 | 2 | public function getLastInsertIdName($col) |
|
46 | |||
47 | /** |
||
48 | * |
||
49 | * Adds returning columns to the query. |
||
50 | * |
||
51 | * Multiple calls to returning() will append to the list of columns, not |
||
52 | * overwrite the previous columns. |
||
53 | * |
||
54 | * @param array $cols The column(s) to add to the query. |
||
55 | * |
||
56 | * @return $this |
||
57 | * |
||
58 | */ |
||
59 | 1 | public function returning(array $cols) |
|
63 | } |
||
64 |
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: