1 | <?php |
||
20 | class Update extends Common\Update implements Common\OrderByInterface, Common\LimitOffsetInterface |
||
21 | { |
||
22 | use Common\LimitOffsetTrait; |
||
23 | |||
24 | 8 | protected function build() |
|
29 | |||
30 | /** |
||
31 | * |
||
32 | * Adds or removes OR ABORT flag. |
||
33 | * |
||
34 | * @param bool $enable Set or unset flag (default true). |
||
35 | * |
||
36 | * @return $this |
||
37 | * |
||
38 | */ |
||
39 | 1 | public function orAbort($enable = true) |
|
44 | |||
45 | /** |
||
46 | * |
||
47 | * Adds or removes OR FAIL flag. |
||
48 | * |
||
49 | * @param bool $enable Set or unset flag (default true). |
||
50 | * |
||
51 | * @return $this |
||
52 | * |
||
53 | */ |
||
54 | 1 | public function orFail($enable = true) |
|
59 | |||
60 | /** |
||
61 | * |
||
62 | * Adds or removes OR IGNORE flag. |
||
63 | * |
||
64 | * @param bool $enable Set or unset flag (default true). |
||
65 | * |
||
66 | * @return $this |
||
67 | * |
||
68 | */ |
||
69 | 1 | public function orIgnore($enable = true) |
|
74 | |||
75 | /** |
||
76 | * |
||
77 | * Adds or removes OR REPLACE flag. |
||
78 | * |
||
79 | * @param bool $enable Set or unset flag (default true). |
||
80 | * |
||
81 | * @return $this |
||
82 | * |
||
83 | */ |
||
84 | 1 | public function orReplace($enable = true) |
|
89 | |||
90 | /** |
||
91 | * |
||
92 | * Adds or removes OR ROLLBACK flag. |
||
93 | * |
||
94 | * @param bool $enable Set or unset flag (default true). |
||
95 | * |
||
96 | * @return $this |
||
97 | * |
||
98 | */ |
||
99 | 1 | public function orRollback($enable = true) |
|
104 | |||
105 | /** |
||
106 | * |
||
107 | * Adds a column order to the query. |
||
108 | * |
||
109 | * @param array $spec The columns and direction to order by. |
||
110 | * |
||
111 | * @return $this |
||
112 | * |
||
113 | */ |
||
114 | 1 | public function orderBy(array $spec) |
|
118 | } |
||
119 |
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: