コード例 #1
0
 /**
  * Finds the PartidaEspecifca model based on its composed key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param char(1) $cuenta
  * @param char(2) $partida
  * @param char(2) $generica
  * @param char(2) $especifica
  * @return el modelo
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($cuenta, $partida, $generica, $especifica)
 {
     if (($model = PartidaEspecifica::findOne(['cuenta' => $cuenta, 'partida' => $partida, 'generica' => $generica, 'especifica' => $especifica])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }