public static function SimpleLdap::ldap_get_option in Simple LDAP 7
Same name and namespace in other branches
- 7.2 SimpleLdap.class.php \SimpleLdap::ldap_get_option()
Wrapper function for ldap_get_option().
@throw SimpleLdapException
Parameters
resource $link_identifier: An LDAP link identifier.
int $option: The parameter option. @see http://us2.php.net/manual/en/function.ldap-get-option.php
mixed $retval: This will be set to the option value.
Return value
boolean TRUE on success.
2 calls to SimpleLdap::ldap_get_option()
- SimpleLdapServer::__get in ./
SimpleLdapServer.class.php - Magic __get() function.
- SimpleLdapServer::__set in ./
SimpleLdapServer.class.php - Magic __set() function, handles changing server settings.
File
- ./
SimpleLdap.class.php, line 734 - Class defining base Simple LDAP functionallity.
Class
- SimpleLdap
- Simple LDAP class.
Code
public static function ldap_get_option($link_identifier, $option, &$retval) {
// Devel debugging.
if (variable_get('simple_ldap_devel', FALSE)) {
dpm(__FUNCTION__);
dpm(array(
'$option' => $option,
'$retval' => $retval,
));
}
// Wrapped function call.
$return = @ldap_get_option($link_identifier, $option, $retval);
// Debugging.
if (variable_get('simple_ldap_debug', FALSE)) {
$message = __FUNCTION__ . '($link_identifier = @link_identifier, $option = @option, $retval = @retval) returns @return';
$variables = array(
'@link_identifier' => print_r($link_identifier, TRUE),
'@option' => print_r($option, TRUE),
'@retval' => print_r($retval, TRUE),
'@return' => print_r($return, TRUE),
);
watchdog('simple_ldap', $message, $variables, WATCHDOG_DEBUG);
}
// Error handling.
if ($return === FALSE) {
throw new SimpleLdapException($link_identifier);
}
return $return;
}