'section = :section: AND item_key = :item_key:', 'bind' => ['section' => $section, 'item_key' => $itemKey], ]); return $result; } /** * @param string $section * @return Resultset|ResultsetInterface|ConfigModel[] */ public function findBySection($section) { $query = ConfigModel::query(); $query->where('section = :section:', ['section' => $section]); $result = $query->execute(); return $result; } /** * @param array $where * @return Resultset|ResultsetInterface|ConfigModel[] */ public function findAll($where = []) { $query = ConfigModel::query(); $query->where('1 = 1'); if (!empty($where['section'])) { $query->andWhere('section = :section:', ['section' => $where['section']]); } $result = $query->execute(); return $result; } }