1 | <?php |
||
20 | class Delete extends AbstractDmlQuery implements DeleteInterface |
||
21 | { |
||
22 | /** |
||
23 | * |
||
24 | * The table to delete from. |
||
25 | * |
||
26 | * @var string |
||
27 | * |
||
28 | */ |
||
29 | protected $from; |
||
30 | |||
31 | /** |
||
32 | * |
||
33 | * Sets the table to delete from. |
||
34 | * |
||
35 | * @param string $table The table to delete from. |
||
36 | * |
||
37 | * @return $this |
||
38 | * |
||
39 | */ |
||
40 | 13 | public function from($table) |
|
45 | |||
46 | /** |
||
47 | * |
||
48 | * Builds this query object into a string. |
||
49 | * |
||
50 | * @return string |
||
51 | * |
||
52 | */ |
||
53 | 11 | protected function build() |
|
63 | |||
64 | /** |
||
65 | * |
||
66 | * Builds the FROM clause. |
||
67 | * |
||
68 | * @return string |
||
69 | * |
||
70 | */ |
||
71 | 11 | protected function buildFrom() |
|
75 | |||
76 | /** |
||
77 | * |
||
78 | * Adds a WHERE condition to the query by AND. If the condition has |
||
79 | * ?-placeholders, additional arguments to the method will be bound to |
||
80 | * those placeholders sequentially. |
||
81 | * |
||
82 | * @param string $cond The WHERE condition. |
||
83 | * @param mixed ...$bind arguments to bind to placeholders |
||
84 | * |
||
85 | * @return $this |
||
86 | * |
||
87 | */ |
||
88 | 10 | public function where($cond) |
|
93 | |||
94 | /** |
||
95 | * |
||
96 | * Adds a WHERE condition to the query by OR. If the condition has |
||
97 | * ?-placeholders, additional arguments to the method will be bound to |
||
98 | * those placeholders sequentially. |
||
99 | * |
||
100 | * @param string $cond The WHERE condition. |
||
101 | * @param mixed ...$bind arguments to bind to placeholders |
||
102 | * |
||
103 | * @return $this |
||
104 | * |
||
105 | * @see where() |
||
106 | * |
||
107 | */ |
||
108 | 10 | public function orWhere($cond) |
|
113 | } |
||
114 |