Net_LDAP
[ class tree: Net_LDAP ] [ index: Net_LDAP ] [ all elements ]

Class: Net_LDAP_Entry

Source Location: /Net_LDAP-0.6.6/LDAP/Entry.php

Class Overview

PEAR
   |
   --Net_LDAP_Entry

This class represents an LDAP entry


Author(s):

  • Tarjei Huse

Version:

  • $Revision: 1.15.2.2 $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 34]
This class represents an LDAP entry
  • Author: Tarjei Huse
  • Version: $Revision: 1.15.2.2 $


[ Top ]


Method Detail

Net_LDAP_Entry (Constructor)   [line 110]

- Net_LDAP_Entry( [- $link = null], [ $dn = null], [ $attributes = null])

Constructor
  • Return: none

Parameters:

-   $link   —  link - ldap_resource_link, dn = string entry dn, attributes - array entry attributes array.
   $dn   — 
   $attributes   — 

[ Top ]

add   [line 213]

mixed add( [array $attr = array()])

Add one or more attribute to the entry

The values given will be added to the values which already exist for the given attributes. usage: $entry->add ( array('sn'=>'huse',objectclass=>array(top,posixAccount)))

  • Return: Net_Ldap_Error if error, else true.

Parameters:

array   $attr   —  Array of attributes

[ Top ]

attributes   [line 198]

array attributes( none 0)

returns an assosiative array of all the attributes in the array

attributes - returns an assosiative array of all the attributes in the array of the form array ('attributename'=>'singelvalue' , 'attribute'=>array('multiple','values'))

  • Return: Array of attributes and values.

Parameters:

none   0   — 

[ Top ]

delete   [line 414]

mixed delete( [- $attrs = array()])

delete attributes

Use this function to delete certain attributes from an object.

  • Return: Net_Ldap_Error if failure, true if success.

Parameters:

-   $attrs   —  array of attributes to be deleted

[ Top ]

dn   [line 264]

void dn( [string $newdn = ''])

Set or get the DN for the object

If a new dn is supplied, this will move the object when running $obj->update();


Parameters:

string   $newdn   —  DN

[ Top ]

exists   [line 281]

boolean exists( string $attr)

check if a certain attribute exists in the directory

Parameters:

string   $attr   —  attribute name.

[ Top ]

get_value   [line 301]

void get_value( [$attr $attr = ''], [$options $options = ''])

get_value get the values for a attribute

returns either an array or a string possible values for option: alloptions - returns an array with the values + a countfield. i.e.: array (count=>1, 'sn'=>'huse'); single - returns the, first value in the array as a string.


Parameters:

$attr   $attr   —  string attribute name
$options   $options   —  array

[ Top ]

modify   [line 336]

mixed modify( [array $attrs = array()])

add/delete/modify attributes

this function tries to do all the things that replace(),delete() and add() does on an object. Syntax: array ( 'attribute' => newval, 'delattribute' => '', newattrivute => newval); Note: You cannot use this function to modify parts of an attribute. You must modify the whole attribute. You may call the function many times before running $entry->update();

  • Return: errorObject if failure, true if success.

Parameters:

array   $attrs   —  attributes to be modified

[ Top ]

replace   [line 384]

mixed replace( [array $attrs = array()])

replace a certain attributes value

replace - replace a certain attributes value example: $entry->replace(array('uid'=>array('tarjei')));

  • Return: error if failure, true if sucess.

Parameters:

array   $attrs   —  attributes to be replaced

[ Top ]

update   [line 449]

mixed update( [object Net_LDAP $ldapObject = null])

update the Entry in LDAP

After modifying an object, you must run update() to make the updates on the ldap server. Before that, they only exists in the object.

  • Return: Net_LDAP_Error object on failure or true on success

Parameters:

object Net_LDAP   $ldapObject   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:26:18 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.