/**
  * [getStatbyYear description]
  * @return [type] [description]
  */
 private function getStatbyYear()
 {
     $model = new ApiResources();
     if (!isset($_GET['tahun']) && isset($_GET['mulai_tahun']) && isset($_GET['sampai_tahun'])) {
         return $model->getStatJmlPddbyRangeYear($_GET['mulai_tahun'], $_GET['sampai_tahun']);
     } elseif (isset($_GET['tahun']) && !isset($_GET['mulai_tahun']) && !isset($_GET['sampai_tahun'])) {
         return $model->getStatJmlPddbyYear($_GET['tahun']);
     } else {
         throw new yii\web\BadRequestHttpException();
         exit;
     }
 }