Bouncy Melons 0.1
declarative style orm
FilterPermissive.php
Go to the documentation of this file.
1 <?php
2 namespace bm;
3 
5 
10  public function createWhere($fields) {
11  $input = $this->getWhere();
12  $re = [];
13  foreach ($fields as $field) {
14  if (empty($input[$field->getName()])) {
15  continue;
16  }
17  $re[] = "`".$field->getName()."` LIKE '%".$input[$field->getName()]."%'";
18  }
19  return implode(' AND ', $re);
20  }
21 }