MCPcopy Create free account
hub / github.com/Rello/analytics / search

Method search

lib/Db/PanoramaMapper.php:252–266  ·  view source on GitHub ↗

* search reports by search string * @param $searchString * @return array * @throws Exception */

($searchString)

Source from the content-addressed store, hash-verified

250 * @throws Exception
251 */
252 public function search($searchString)
253 {
254 $sql = $this->db->getQueryBuilder();
255 $sql->from(self::TABLE_NAME)
256 ->select('id')
257 ->addSelect('name')
258 ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))
259 ->andWhere($sql->expr()->iLike('name', $sql->createNamedParameter('%' . $this->db->escapeLikeParameter($searchString) . '%')))
260 ->orderBy('name', 'ASC');
261 $statement = $sql->executeQuery();
262 $result = $statement->fetchAll();
263 $statement->closeCursor();
264
265 return $result;
266 }
267
268
269 /**

Callers

nothing calls this directly

Calls 1

eqMethod · 0.80

Tested by

no test coverage detected