/**
  * [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;
     }
 }
 /**
  * Get civil data
  * @param  integer $nik   civil unique indentity
  * @param  string $field requested column name
  * @return array        normalized civil data
  */
 private function getPenduduk($nik, $field)
 {
     $reqCols = $this->getSelectedCols($field);
     if (!empty($reqCols)) {
         $model = new ApiResources();
         $data = $model->getPenduduk($nik, $reqCols);
         return $this->exchangeData($data);
     }
 }
 /**
  * [getInfoKK description]
  * @param  [type] $nik [description]
  * @return [type]      [description]
  */
 private function getInfoKK($nik)
 {
     $model = new ApiResources();
     $data = $model->getInfoKK($nik);
     return $this->exchangeData($data);
 }