1 | <?php |
||
16 | class PlaceholderWriter |
||
17 | { |
||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $counter = 1; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $placeholders = []; |
||
27 | |||
28 | /** |
||
29 | * @return array |
||
30 | */ |
||
31 | public function get() |
||
35 | |||
36 | /** |
||
37 | * @return $this |
||
38 | */ |
||
39 | public function reset() |
||
46 | |||
47 | /** |
||
48 | * @param $value |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function add($value) |
||
61 | |||
62 | /** |
||
63 | * @param $value |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | protected function setValidSqlValue($value) |
||
75 | |||
76 | /** |
||
77 | * @param $value |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | protected function writeNullSqlString($value) |
||
89 | |||
90 | /** |
||
91 | * @return string |
||
92 | */ |
||
93 | protected function writeNull() |
||
97 | |||
98 | /** |
||
99 | * @param string $value |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | protected function writeStringAsSqlString($value) |
||
111 | |||
112 | /** |
||
113 | * @param string $value |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | protected function writeString($value) |
||
121 | |||
122 | /** |
||
123 | * @param string $value |
||
124 | * |
||
125 | * @return string |
||
126 | */ |
||
127 | protected function writeBooleanSqlString($value) |
||
135 | |||
136 | /** |
||
137 | * @param bool $value |
||
138 | * |
||
139 | * @return string |
||
140 | */ |
||
141 | protected function writeBoolean($value) |
||
147 | } |
||
148 |