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

Class: NETLDAP

Source Location: /NETLDAP.php

Class Overview


This class manages NETLDAP objects.


Author(s):

Version:

  • 2.1

Variables

Methods



Class Details

[line 32]
This class manages NETLDAP objects.

Created on 01 mars 09

Changes: 2.0 -> 2.1: 22 jul 09 added: file is PEAR compatible 1.0 -> 2.0: updated: phpdoc compatible in the way to generate documentation




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  2.1
license:  GNU Public License


[ Top ]


Class Variables

$debug =  false

[line 87]

Variable that contains debug switch



Tags:

access:  public

Type:   bool


[ Top ]

$ldap_basedn =  "dc=pandore,dc=dev"

[line 59]

Variable that contains LDAP base DN



Tags:

access:  public

Type:   string


[ Top ]

$ldap_bind =

[line 43]

Variable that contains LDAP bind



Tags:

access:  public

Type:   bool


[ Top ]

$ldap_binddn =

[line 70]

Variable that contains bind DN



Tags:

access:  public

Type:   string


[ Top ]

$ldap_bindpw =

[line 75]

Variable that contains bind password



Tags:

access:  public

Type:   string


[ Top ]

$ldap_host =  "pandore.dev"

[line 54]

Variable that contains LDAP Host



Tags:

access:  public

Type:   string


[ Top ]

$ldap_sr =

[line 48]

Variable that contains LDAP search



Tags:

access:  public

Type:   string


[ Top ]

$ldap_use_start_tls =  false

[line 64]

Variable that contains Start TLS switch



Tags:

access:  public

Type:   bool


[ Top ]

$search =

[line 81]

Variable that contains search string



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 120]

NETLDAP __construct( string $ldap_binddn, string $ldap_bindpw, [string $ldap_host = false], [string $ldap_basedn = false], [bool $ldap_use_start_tls = false])

Construction function

This function is used when object is generated. It places variables in "$this" var and can launch function

  1.  <?php
  2.  $oLDAP    new LDAP(
  3.       "login",
  4.       "password"
  5.  );
  6.  echo $LDAP->ldap_binddn;
  7.  // login
  8.  ?>




Tags:

since:  version 1.0
uses:  NETLDAP::connect()


Parameters:

string   $ldap_binddn   username to use to log to the LDAP (required)
string   $ldap_bindpw   password to use to log to the LDAP (required)
string   $ldap_host   host where LDAP is
string   $ldap_basedn   base DN of the LDAP
bool   $ldap_use_start_tls   start tls switch

[ Top ]

destructor __destruct [line 167]

void __destruct( )

Destruction function

This function is used when object is destruct.

  1.  <?php
  2.  $oLDAP    new LDAP(
  3.       "login",
  4.       "password"
  5.  );
  6.  unset($oLDAP);
  7.  ?>




Tags:

since:  Version 1.0


[ Top ]

method connect [line 199]

bool connect( string $ldap_binddn, string $ldap_bindpw, string $ldap_host)

Connection function

This function is used to connect to a LDAP

  1.  <?php
  2.  $oLDAP    new LDAP(
  3.       "login",
  4.       "password"
  5.  );
  6.  ?>




Tags:

return:  true if the query could be applied
since:  version 1.0
usedby:  NETLDAP::__construct()


Parameters:

string   $ldap_binddn   username to use to log to the LDAP (required)
string   $ldap_bindpw   password to use to log to the LDAP (required)
string   $ldap_host   host where LDAP is

[ Top ]

method search [line 269]

array search( string $search, string $this->basedn)

Search function

This function is used to search in LDAP

  1.  <?php
  2.  $oLDAP            new LDAP("login""password");
  3.  $oLDAP->search    = 'uidnumber=1025';
  4.  print_r($oLDAP->search());
  5.  // displays user info array
  6.  ?>




Tags:

return:  LDAP array
since:  version 1.0


Parameters:

string   $search   search string (required)
string   $this->basedn   LDAP base DN

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:30 +0200 by phpDocumentor 1.4.1