blob: b4a7f8db9610bd94e873d7fed0edc2a4627dbdcd [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace LdapRecord\Query\Pagination;
4
5use LdapRecord\LdapInterface;
6
7/**
8 * @deprecated since v2.5.0
9 */
10class DeprecatedPaginator extends AbstractPaginator
11{
12 /**
13 * The pagination cookie.
14 *
15 * @var string
16 */
17 protected $cookie = '';
18
19 /**
20 * @inheritdoc
21 */
22 protected function fetchCookie()
23 {
24 return $this->cookie;
25 }
26
27 /**
28 * @inheritdoc
29 */
30 protected function prepareServerControls()
31 {
32 $this->cookie = '';
33 }
34
35 /**
36 * @inheritdoc
37 */
38 protected function applyServerControls(LdapInterface $ldap)
39 {
40 $ldap->controlPagedResult($this->perPage, $this->isCritical, $this->cookie);
41 }
42
43 /**
44 * @inheritdoc
45 */
46 protected function updateServerControls(LdapInterface $ldap, $resource)
47 {
48 $ldap->controlPagedResultResponse($resource, $this->cookie);
49 }
50
51 /**
52 * @inheritdoc
53 */
54 protected function resetServerControls(LdapInterface $ldap)
55 {
56 $ldap->controlPagedResult();
57 }
58}