params['shop']) { throw new WebserviceException( 'Invalid request parameters, \'shop\' parameter is required for \'products\' resource.', [self::DEFAULT_ERROR_CODE, 400] ); } } /** * @inheritDoc */ protected function getTableName() { return 'product_shop'; } /** * @inheritDoc */ public function getObjectById($productId) { return ProductPayloadService::buildPayload( new Product($productId, false, null, $this->params['shop']), $id_shop = $this->params['shop'] ); } /** * @inheritDoc */ public function getObjectsByTimeRange() { $this->records = $this->getTimeRangeRecords('id_product'); $cursorValue = $this->getCursorValue(); $returnRecords = array(); foreach ($this->records as $record) { array_push( $returnRecords, ProductPayloadService::buildPayload( new Product($record['id_product'], false, null, $this->params['shop']), $id_shop = $this->params['shop'] ) ); } return $this->buildTimeRangeResultsPayload($returnRecords, $cursorValue); } }