| 1 | <?php |
||
| 5 | trait Searchable |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Searches given columns. |
||
| 9 | * |
||
| 10 | * @param string $pattern |
||
| 11 | * @return void |
||
| 12 | */ |
||
| 13 | public function search($pattern = null) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Recursively build up the search query. |
||
| 26 | * |
||
| 27 | * @param string $column |
||
| 28 | * @param string $key |
||
| 29 | * @return void |
||
| 30 | */ |
||
| 31 | protected function resolveSearch($column, $key) |
||
| 37 | } |
||
| 38 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: