/** * Gets reference to the SkipTokenInfo object holding result of * skiptoken parsing, which used by the IDSQP implementor for * custom paging. * * @return SkipTokenInfo */ public function getSkipTokenInfo() { if (is_null($this->_skipTokenInfo)) { $orderbyInfo = $this->_internalOrderByInfo->getOrderByInfo(); $this->_skipTokenInfo = new SkipTokenInfo($orderbyInfo, $this->_orderByValuesInSkipToken); } return $this->_skipTokenInfo; }
/** * Get part of SQL query with ORDER BY condition * * @param InternalOrderByInfo $orderBy Order by condition * * @return string ORDER BY condition */ protected function getOrderByExpressionAsString(InternalOrderByInfo $orderBy) { $result = ''; foreach ($orderBy->getOrderByInfo()->getOrderByPathSegments() as $order) { foreach ($order->getSubPathSegments() as $subOrder) { $result .= $result ? ', ' : ''; $result .= $subOrder->getName(); $result .= $order->isAscending() ? ' ASC' : ' DESC'; } } return $result; }