ldap_parse_result
(PHP 4 >= 4.0.5, PHP 5)
ldap_parse_result — Извлечь информацию из результата
Описание
bool ldap_parse_result
( resource
$link
, resource $result
, int &$errcode
[, string &$matcheddn
[, string &$errmsg
[, array &$referrals
]]] )Внимание
К настоящему времени эта функция еще не была документирована; для ознакомления доступен только список аргументов.
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Другие службы
- Облегчённый протокол доступа к каталогам (LDAP)
- ldap_8859_to_t61
- ldap_add
- ldap_bind
- ldap_close
- ldap_compare
- ldap_connect
- ldap_control_paged_result_response
- ldap_control_paged_result
- ldap_count_entries
- ldap_delete
- ldap_dn2ufn
- ldap_err2str
- ldap_errno
- ldap_error
- ldap_escape
- ldap_explode_dn
- ldap_first_attribute
- ldap_first_entry
- ldap_first_reference
- ldap_free_result
- ldap_get_attributes
- ldap_get_dn
- ldap_get_entries
- ldap_get_option
- ldap_get_values_len
- ldap_get_values
- ldap_list
- ldap_mod_add
- ldap_mod_del
- ldap_mod_replace
- ldap_modify_batch
- ldap_modify
- ldap_next_attribute
- ldap_next_entry
- ldap_next_reference
- ldap_parse_reference
- ldap_parse_result
- ldap_read
- ldap_rename
- ldap_sasl_bind
- ldap_search
- ldap_set_option
- ldap_set_rebind_proc
- ldap_sort
- ldap_start_tls
- ldap_t61_to_8859
- ldap_unbind
Коментарии
I made some debugging to find out what this function really does.
<?php
$sr = ldap_search($ldapconn, $searchDn, 'objectclass=*');
$return = ldap_parse_result($ldapconn, $sr, $errcode, $matcheddn, $errormsg, $ldapreferrals);
var_dump($return); // bool(true)
var_dump($errcode); // int(0)
var_dump($matcheddn); // string(0) ""
var_dump($errormsg); // string(0) ""
var_dump($ldapreferrals);// array(0) {}
?>
If the searchresult is not valid everything will be NULL.
If this function for some reason cant parse the valid result an E_Warning will be thrown and $return will be false and $errcode, $errmsg will be filled with the ldap errorcode and ldap errorstring.
until now I was not able to create a valid search result that was not parse-able.
If your search-result contains ldap_referrals they will be listend in the $ldapreferrals array.
I have no Idea when the $matcheddn param gets filled.
For more detailed information look at C function http://linux.die.net/man/3/ldap_parse_result php basically passes all parameters to this function and returns the same things.