Sitellite Application Framework
Class Tree         Index         All Elements

Class: LDAP

Source Location: Program_Root/Database/LDAP.php

Class Overview


A wrapper around the PHP LDAP extension.


Author(s)

Version

  • 0.2, 2002-08-27, $Id: LDAP.php,v 1.4 2006/10/11 00:39:32 lux Exp $

Copyright

  • Copyright (C) 2001-2003, Simian Systems Inc.

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 53]
A wrapper around the PHP LDAP extension.


1 <?php
2
3 $ldap = new LDAP ('server', 389, 'username', 'password');
4
5 if ($ldap->search ($dn, $filter)) {
6 while ($entry = $ldap->fetch ()) {
7 // do something with $entry
8 }
9 }
10
11 $ldap->free ();
12
13 $ldap->close ();
14
15 ? >




Tags:

access:  public
version:  0.2, 2002-08-27, $Id: LDAP.php,v 1.4 2006/10/11 00:39:32 lux Exp $
license:  http://www.sitellite.org/index/license
copyright:  Copyright (C) 2001-2003, Simian Systems Inc.
author:  John Luxford <mailto:lux@simian.ca>


[ Top ]


Class Variables

$connection =

[line 101]

The current connection resource.



Tags:

access:  public

Type:   mixed


[ Top ]

$errno =

[line 126]

The errno of the previous error.



Tags:

access:  public

Type:   mixed


[ Top ]

$error =

[line 134]

The message of the previous error.



Tags:

access:  public

Type:   mixed


[ Top ]

$firstCalled =

[line 118]

Says whether or not the first search result entry has been returned.



Tags:

access:  public

Type:   mixed


[ Top ]

$password =

[line 85]

The password to use to bind to the connection.



Tags:

access:  public

Type:   mixed


[ Top ]

$port =

[line 68]

The port to use to connect to the server.



Tags:

access:  public

Type:   mixed


[ Top ]

$rdn =

[line 77]

The rdn (username, essentially) to use to bind to the connection.



Tags:

access:  public

Type:   mixed


[ Top ]

$resource =

[line 109]

The current search resource.



Tags:

access:  public

Type:   mixed


[ Top ]

$secure =

[line 93]

Whether to use TLS for LDAP connections.



Tags:

access:  public

Type:   mixed


[ Top ]

$server =

[line 60]

The name of the server to connect to.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor LDAP [line 147]

LDAP LDAP( [string $server = 'localhost'], [integer $port = 389], [string $rdn = ''], [string $password = ''], [mixed $secure = false])

Constructor method. Connects to the server and binds the username and password.



Tags:

access:  public


Parameters:

string   $server  
integer   $port  
string   $rdn  
string   $password  

[ Top ]

method bind [line 196]

boolean bind( [string $rdn = ''], [string $password = ''])

Verifies the $rdn and $password.



Tags:

access:  public


Parameters:

string   $rdn  
string   $password  

[ Top ]

method close [line 347]

void close( )

Closes the connection to the server.



Tags:

access:  public


[ Top ]

method connect [line 165]

boolean connect( string $server, [integer $port = 389], [mixed $secure = false])

Connects to the server.



Tags:

access:  public


Parameters:

string   $server  
integer   $port  

[ Top ]

method fetch [line 280]

associative fetch( )

Fetches the next record in the search results as an associative array. Returns false when there are no more results.



Tags:

return:  array
access:  public


[ Top ]

method free [line 334]

boolean free( )

Clears the current search result resource.



Tags:

access:  public


[ Top ]

method getEntries [line 257]

associative getEntries( )

Returns all of the results of the current search as one big associative array of objects.



Tags:

return:  array
access:  public


[ Top ]

method makeObj [line 307]

object makeObj( associative $attrs)

Convert the returned attributes into the properties of an object.



Tags:

access:  public


Parameters:

associative   $attrs   array

[ Top ]

method search [line 226]

boolean search( string $dn, string $filter, [array $attrs = array ()], [mixed $scope = 'sub'])

Queries the database.



Tags:

access:  public


Parameters:

string   $dn  
string   $filter  
array   $attrs  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:17:53 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2