private function configurationPagination($page = 1)
 {
     $statconfTable = new Table\StatConfTable();
     if (!$statconfTable->connect()->find()->count()) {
         return NOT_FOUND;
     }
     $allConfig = array();
     $i = 0;
     $limit = \appconfig::getPageSize();
     $configurations = $this->Paginator->paginate($statconfTable->connect()->find(), ['limit' => $limit, 'page' => $page]);
     foreach ($configurations as $configuration) {
         $statConfDto = new DTO\ClsStatConfigDto($configuration->ConfigKey, $configuration->ConfigValue);
         $allConfig[$i] = $statConfDto;
         $i++;
     }
     return $allConfig;
 }
 private function questionPagination($page = 1)
 {
     $questionTable = new Table\QuestionTable();
     if (!$questionTable->connect()->find()->count()) {
         return NOT_FOUND;
     }
     $allquestions = array();
     $i = 0;
     $limit = \appconfig::getPageSize();
     $questions = $this->Paginator->paginate($questionTable->connect()->find(), ['limit' => $limit, 'page' => $page]);
     foreach ($questions as $question) {
         $questionDto = new DTO\ClsQuestionDto($question->QuestionId, $question->QuestionText, $question->Active);
         $allquestions[$i] = $questionDto;
         $i++;
     }
     return $allquestions;
 }
 private function destinationPagination($page = 1)
 {
     $destinationTable = new Table\DestinationTable();
     if (!$destinationTable->connect()->find()->count()) {
         return NOT_FOUND;
     }
     $allDest = array();
     $i = 0;
     $limit = \appconfig::getPageSize();
     $destination = $this->Paginator->paginate($destinationTable->connect()->find(), ['limit' => $limit, 'page' => $page]);
     foreach ($destination as $row) {
         $destDto = new DTO\ClsDestinationDto($row->DestId, $row->DestName, $row->Latitude, $row->Longitude, $row->Active);
         $allDest[$i] = $destDto;
         $i++;
     }
     return $allDest;
 }