/** * Create, configure and call Statement * * @param $str_sql * @param null $arr_params * @param String $str_result_class * @param int $int_fetch_mode * @return array|NULL|void */ private function delegateFetch($str_sql, $arr_params, $str_result_class, $int_fetch_mode) { $obj_stmt = new DB\Statement($this->obj_db, $str_sql); if ($str_result_class) { $obj_stmt->setResultClass($str_result_class); } if (self::FETCH_MODE_ONE === $int_fetch_mode) { return $obj_stmt->fetchOne($arr_params); } else { return $obj_stmt->fetchAll($arr_params); } }