code: public function getIndex($aData = [], $iPage = null, $iPerPage = null)
      {
          $oInput     = Factory::service('Input');
          $oItemModel = Factory::model(
              static::CONFIG_MODEL_NAME,
              static::CONFIG_MODEL_PROVIDER
          );
  
          if (is_null($iPage)) {
              $iPage = (int) $oInput->get('page') ?: 1;
          }
  
          if (is_null($iPerPage)) {
              $iPerPage = static::CONFIG_MAX_ITEMS_PER_PAGE;
          }
  
          $aResults = $oItemModel->getAll(
              $iPage,
              $iPerPage,
              $aData
          );
  
          //  @todo (Pablo - 2018-06-24) - Paging
          $oResponse = Factory::factory('ApiResponse', 'nails/module-api');
          $oResponse->setData(array_map([$this, 'formatObject'], $aResults));
          return $oResponse;
      }
docs: Get multiple items
  
  @param  array   $aData    Any data to pass to the model
  @param  integer $iPage    The page to display
  @param  integer $iPerPage The number of items to display at the moment
  
  @return array