Class: Net_LDAP_Entry
Source Location: /Net_LDAP-0.7.0/LDAP/Entry.php
PEAR
|
--Net_LDAP_Entry
Object representation of a directory entry
Author(s):
Version:
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
Net_LDAP_Entry (Constructor) [line 148]
none Net_LDAP_Entry(
&$ldap, [string|ressource
$entry = null], Net_LDAP|ressource|array
$ldap)
|
|
Constructor Constructor of the entry. Sets up the distinguished name and the entries attributes.
Parameters:
add [line 375]
void add(
[array
$attr = array()])
|
|
Adds a new attribute or a new value to an existing attribute The paramter has to be an array of the form: array('attributename' => 'single value', 'attributename' => array('value1', 'value2)) When the attribute already exists the values will be added, else the attribute will be created. These changes are local to the entry and do not affect the entry on the server until update() is called. Note, that you can add values of attributes that you haven't selected, but if you do so, getValue() and getValues() will only return the values you added, _NOT_ all values present on the server. To avoid this, just refetch the entry after calling update() or select the attribute.
Parameters:
attributes [line 339]
Returns an array of attributes names
copy [line 639]
Copy the current entry to another place in the directory
Parameters:
delete [line 428]
void delete(
[string|array
$attr = null])
|
|
Deletes an attribute or a value The parameter can be one of the following: "attributename" - The attribute as a whole will be deleted array("attributename1", "attributename2) - All given attributes will be deleted array("attributename" => "value") - The value will be deleted array("attributename" => array("value1", "value2") - The given values will be deleted If $attr is null or omitted , then the whole Entry will be deleted! These changes are local to the entry and do not affect the entry on the server until update() is called. Please note that you must select the attribute (at $ldap->search() for example) to be able to delete values of it, Otherwise update() will silently fail and remove nothing.
Parameters:
dn [line 188]
string|true dn(
[string
$dn = null])
|
|
Get or set the distinguished name of the entry If called without an argument the current (or the new DN if set) DN gets returned. If you provide an DN, this entry is moved to the new location specified if a DN existed. If the DN was not set, the DN gets initialized. Call update() to actually create the new Entry in the directory. Please note that special characters (eg german umlauts) should be encoded using utf8_encode().
Parameters:
exists [line 351]
boolean exists(
string
$attr)
|
|
Returns whether an attribute exists or not
Parameters:
getLDAP [line 674]
Returns a reference to the LDAP-Object of this entry
getValue [line 305]
string|array|PEAR_Error getValue(
string
$attr, [string
$option = null])
|
|
Get the value of a specific attribute The first parameter is the name of the attribute The second parameter influences the way the value is returned: 'single': only the first value is returned as string 'all': all values including the value count are returned in an array 'default': in all other cases an attribute value with a single value is returned a string, if it has multiple values it is returned as an array (without value count)
Parameters:
getValues [line 279]
Get the values of all attributes in a hash The returned hash has the form array('attributename' => 'single value', 'attributename' => array('value1', value2', value3'))
get_value [line 327]
Alias function of getValue for perl-ldap interface
ldap_explode_dn_escaped [line 698]
void ldap_explode_dn_escaped(
string
$dn, [
$only_values = 0], string
$only)
|
|
Wrapper function for PHPs ldap_explode_dn() PHPs ldap_explode_dn() does not escape DNs so it will fail if the parameter $dn is something like "<foobar>" or contains Umlauts. This method ensures, that the DN is properly escaped and encoded. It is taken from http://php.net/ldap_explode_dn and slightly modified.
Parameters:
replace [line 490]
void replace(
[array
$attr = array()])
|
|
Replaces attributes or its values The parameter has to an array of the following form: array("attributename" => "single value", "attribute2name" => array("value1", "value2")) If the attribute does not yet exist it will be added instead. If the attribue value is null, the attribute will de deleted These changes are local to the entry and do not affect the entry on the server until update() is called.
Parameters:
update [line 524]
Update the entry on the directory server
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:56:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|