#endif
#ifdef LDAP_CONTROL_PAGEDRESULTS
-/* {{{ proto bool ldap_control_paged_result(resource link, int pagesize [, bool iscritical [, string cookie]])
+/* {{{ proto mixed ldap_control_paged_result(resource link, int pagesize [, bool iscritical [, string cookie]])
Inject paged results control*/
PHP_FUNCTION(ldap_control_paged_result)
{
}
/* }}} */
-/* {{{ proto bool ldap_control_paged_result_response(resource link, resource result [, string cookie [, int estimated]])
+/* {{{ proto bool ldap_control_paged_result_response(resource link, resource result [, string &cookie [, int &estimated]])
Extract paged results control response */
PHP_FUNCTION(ldap_control_paged_result_response)
{
ber_tag_t tag;
int rc, lerrcode, myargcount = ZEND_NUM_ARGS();
-
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|zz", &link, &result, &cookie, &estimated) != SUCCESS) {
return;
}
--TEST--
-ldap_ldap_control_paged_results() test (fetching the first page)
+ldap_ldap_control_paged_result() test (fetching the first page)
--CREDITS--
Jean-Sebastien Hedde <jeanseb@au-fil-du.net>
--SKIPIF--
$dn = "dc=my-domain,dc=com";
$filter = "(cn=*)";
var_dump(
- ldap_control_paged_results($link, 1),
+ ldap_control_paged_result($link, 1),
$result = ldap_search($link, $dn, $filter, array('cn')),
ldap_get_entries($link, $result)
);
--TEST--
-ldap_ldap_control_paged_results() test (fetching the first page then the next final page)
+ldap_ldap_control_paged_result() test (fetching the first page then the next final page)
--CREDITS--
Jean-Sebastien Hedde <jeanseb@au-fil-du.net>
--SKIPIF--
$filter = "(cn=*)";
$cookie = '';
var_dump(
- ldap_control_paged_results($link, 2, true, $cookie),
+ ldap_control_paged_result($link, 2, true, $cookie),
$result = ldap_search($link, $dn, $filter, array('cn')),
ldap_get_entries($link, $result),
- ldap_control_paged_results_response($link, $result, $cookie),
- ldap_control_paged_results($link, 20, true, $cookie),
+ ldap_control_paged_result_response($link, $result, $cookie),
+ ldap_control_paged_result($link, 20, true, $cookie),
$result = ldap_search($link, $dn, $filter, array('cn')),
ldap_get_entries($link, $result)
);