/** * Process the $skiptoken option in the request and update the request * description, this function requires _processOrderBy method to be * already invoked. * * @return void * * @throws ODataException Throws bad request error in the following cases * (1) If $skiptoken cannot be applied to the * resource targeted by the request uri * (2) If paging is not enabled for the resource * targeted by the request uri * (3) If parsing of $skiptoken fails * (4) If capability negotiation over version fails */ private function _processSkipToken() { $skipToken = $this->service->getHost()->getQueryStringItem(ODataConstants::HTTPQUERY_STRING_SKIPTOKEN); if (is_null($skipToken)) { return; } if (!$this->_pagingApplicable) { throw ODataException::createBadRequestError(Messages::queryProcessorSkipTokenNotAllowed()); } if (!$this->_isSSPagingRequired()) { throw ODataException::createBadRequestError(Messages::queryProcessorSkipTokenCannotBeAppliedForNonPagedResourceSet($this->request->getTargetResourceSetWrapper())); } $internalOrderByInfo = $this->request->getInternalOrderByInfo(); //assert($internalOrderByInfo != null) $targetResourceType = $this->request->getTargetResourceType(); //assert($targetResourceType != null) $internalSkipTokenInfo = SkipTokenParser::parseSkipTokenClause($targetResourceType, $internalOrderByInfo, $skipToken); $this->request->setInternalSkipTokenInfo($internalSkipTokenInfo); $this->request->raiseMinVersionRequirement(2, 0); $this->request->raiseResponseVersion(2, 0); }