/**
  * @param string $url
  * @param mixed $cursor
  * @return \WoohooLabs\Yin\JsonApi\Schema\Link|null
  */
 protected function createPaginatedLink($url, $cursor)
 {
     if ($cursor === null) {
         return null;
     }
     return new Link($this->appendQueryStringToUrl($url, CursorBasedPagination::getPaginationQueryString($cursor)));
 }
예제 #2
0
파일: Request.php 프로젝트: woohoolabs/yin
 /**
  * @param mixed $defaultCursor
  * @return \WoohooLabs\Yin\JsonApi\Request\Pagination\CursorBasedPagination
  */
 public function getCursorBasedPagination($defaultCursor = null)
 {
     return CursorBasedPagination::fromPaginationQueryParams($this->getPagination(), $defaultCursor);
 }