53 $this->ldap_handle = $a_ldap_connection;
54 $this->result = $a_result;
68 return $this->data ? $this->data : array();
79 return $this->all_rows ? $this->all_rows : array();
103 $this->data = array();
104 $this->num_results = 0;
111 $this->num_results = $this->entries[
'count'];
112 if($this->entries[
'count'] == 0)
117 for($row_counter = 0; $row_counter < $this->entries[
'count'];$row_counter++)
120 foreach($this->entries[$row_counter] as
$key => $value)
130 $data[
'dn'] = $value;
134 if($value[
'count'] > 1)
136 for($i = 0; $i < $value[
'count']; $i++)
141 elseif($value[
'count'] == 1)
146 $this->all_rows[] =
$data;
147 if($row_counter == 0)
157 @ldap_free_result($this->result);
168 return $this->entries = @ldap_get_entries($this->ldap_handle,$this->result);
173 $tmp_entries = array();
174 $entry = ldap_first_entry($this->ldap_handle,$this->result);
176 $attributes = @ldap_get_attributes($this->ldap_handle, $entry);
177 for($j=0; $j<$attributes[
'count']; $j++)
179 $values = ldap_get_values_len($this->ldap_handle, $entry,$attributes[$j]);
180 $tmp_entries[$i][strtolower($attributes[$j])] = $values;
183 }
while ($entry = @ldap_next_entry($this->ldap_handle,$entry));
187 $tmp_entries[
'count'] = $i;
189 $this->entries = $tmp_entries;