Dreamscapes/Ldap/Core/Result.php
public function pagedResultResponse($key = null)
    {
        $cookie = null;
        $estimated = null;

        @ldap_control_paged_result_response($this->link, $this->resource, $cookie, $estimated);

        switch ($key) {
            case 'cookie':
                return $cookie;

            case 'estimated':
                return $estimated;

            default:
                return [ 'cookie' => $cookie, 'estimated' => $estimated ];
        }
    }
public function pagedResultResponse($key = null)
    {
        $cookie = null;
        $estimated = null;

        @ldap_control_paged_result_response($this->link, $this->resource, $cookie, $estimated);

        switch ($key) {
            case 'cookie':
                return $cookie;

            case 'estimated':
                return $estimated;

            default:
                return [ 'cookie' => $cookie, 'estimated' => $estimated ];
        }
    }
Retrieve the LDAP pagination cookie

@param  string       $key    Optionally return only one of the keys: 'cookie' or 'estimated'
@return array|mixed          Array with two keys: 'cookie' and 'estimated' or, if `$key` was
specified, returns the value of only that key