Class: DB_ldap2
Source Location: /DB_ldap2-0.5.1/ldap2.php
DB_common
|
--DB_ldap2
LDAP2 DB interface class
Author(s):
Version:
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
DB_ldap2 (Constructor) [line 119]
Constructor, calls DB_common constructor
affectedRows [line 639]
Gets the number of rows affected by the last query. if the last query was a select, returns 0.
base [line 691]
void base(
[
$base_dn = null])
|
|
Parameters:
connect [line 173]
int connect(
$dsn
$dsninfo, [boolean
$persistent = false])
|
|
Connect and bind to LDAPv2 server with either anonymous or authenticated bind depending on dsn info The format of the supplied DSN: ldap2://binddn:bindpw@host:port/basedn I.e.: ldap2://uid=dexter,ou=People,dc=example,dc=net:secret@127.0.0.1/dc=example,dc=net
Overridden in child classes as:
- DB_ldap3::connect()
- Connect and bind to LDAPv3 server with either anonymous or authenticated bind depending on dsn info
Parameters:
createSequence [line 816]
mixed createSequence(
string
$seq_name)
|
|
Create the sequence The sequence entry is based on core schema with extensibleObject, so it should work with any LDAP server which doesn't check schema or supports extensibleObject object class. Format of the entry: dn: $seq_dn objectClass: top objectClass: extensibleObject sn: $seq_id cn: $seq_value uid: $seq_uniq
Parameters:
disconnect [line 233]
dropSequence [line 844]
mixed dropSequence(
string
$seq_name)
|
|
Drop a sequence
Parameters:
errorNative [line 625]
Get the native error code of the last error (if any) that occured on the current connection.
executeEmulateQuery [line 1014]
mixed executeEmulateQuery(
resource
$stmt, [array
$data = false])
|
|
Emulates the execute statement.
Parameters:
fetchInto [line 447]
int fetchInto(
$result
$result, $arr
&$arr, $fetchmode
$fetchmode, [$rownum
$rownum = null])
|
|
Fetch a row and insert the data into an existing array. DB_FETCHMODE_ORDERED returns a flat array of values ("value", "val1", "val2"). DB_FETCHMODE_ASSOC returns an array of structuralized data ("field_name1" => "value", "field_name2" => array("val1", "val2")).
Parameters:
fetchRow [line 416]
array fetchRow(
$result
$result, [$fetchmode
$fetchmode = DB_FETCHMODE_DEFAULT], [$rownum
$rownum = null])
|
|
Fetch and return a row of data (it uses fetchInto for that)
Parameters:
freeResult [line 543]
bool freeResult(
$result
$result)
|
|
Free the internal resources associated with $result.
Parameters:
getListOf [line 664]
Returns the query needed to get some backend info. This function is used only for compatibility reasons.
Parameters:
getTables [line 650]
isManip [line 680]
boolean isManip(
string
$action)
|
|
Tell whether an action is a data manipulation action (add, compare, delete, modify, mod_add, mod_del, mod_replace, rename)
Parameters:
ldapExplodeDN [line 1236]
array ldapExplodeDN(
string
$dn, [int
$with_attrib = 0])
|
|
Splits the DN and breaks it up into its component parts. Each part is known as Relative Distinguished Name, or RDN.
Parameters:
ldapGetOption [line 1215]
bool ldapGetOption(
int
$option,
&$retval, mixed
$retval)
|
|
Gets the current value for given option.
Parameters:
ldapGetParam [line 1173]
mixed ldapGetParam(
string
$param)
|
|
Gets the default parameters for query.
Parameters:
ldapRaiseError [line 866]
mixed ldapRaiseError(
[int
$errno = null])
|
|
Generate error message for LDAP errors.
Parameters:
ldapSetAction [line 716]
void ldapSetAction(
[
$action = 'search'])
|
|
Parameters:
ldapSetBaseDN [line 703]
void ldapSetBaseDN(
[
$base_dn = null])
|
|
Parameters:
ldapSetOption [line 1194]
bool ldapSetOption(
int
$option, mixed
$newval)
|
|
Sets the value of the given option.
Parameters:
ldapSetParam [line 1151]
mixed ldapSetParam(
string
$param, string
$value)
|
|
Sets the default parameters for query.
Parameters:
nextId [line 738]
a nextId(
string
$seq_name, [bool
$ondemand = true])
|
|
Get the next value in a sequence. LDAP provides transactions for only one entry and we need to prevent race condition. If unique value before and after modify aren't equal then wait and try again.
Parameters:
nextResult [line 400]
true nextResult(
a
$result)
|
|
Move the internal ldap result pointer to the next available result
Parameters:
numCols [line 592]
int numCols(
$result
$result)
|
|
Get the number of columns in a result set. This function is used only for compatibility reasons.
Parameters:
numRows [line 607]
int numRows(
$result
$result)
|
|
Get the number of rows in a result set.
Parameters:
prepare [line 931]
resource prepare(
mixed
$query)
|
|
Prepares a query for multiple execution with execute(). This behaviour is emulated for LDAP backend. prepare() requires a generic query as an array with special characters (wildcards) as values. Types of wildcards: ? - a quoted scalar value, i.e. strings, integers & - requires a file name, the content of the file insert into the query (i.e. saving binary data in a db) ! - value is inserted 'as is' Example: $sth = $dbh->prepare( array( array( 'dn' => '?', 'objectClass' => '?', 'cn' => '?', 'sn' => '?', 'description' => '&' ), 'action' => 'add' ); ); $sigfile = "/home/dexter/.signature"; $res = $dbh->execute($sth, array( 'cn=Piotr Roszatycki,dc=example,dc=com', array('top', 'person'), 'Piotr Roszatycki', 'Roszatycki', $sigfile ));
Parameters:
quote [line 575]
mixed quote(
[$string
$str = null])
|
|
Quote the given string so it can be safely used within string delimiters in a query.
Parameters:
simpleQuery [line 294]
int simpleQuery(
mixed
$query)
|
|
Performs a request against the LDAP server The type of request depend on $query parameter. If $query is string, perform simple searching query with filter in $query parameter. If $query is array, the first element of array is filter string (for reading operations) or data array (for writing operations). Another elements of $query array are query parameters which overrides the default parameters. The following parameters can be passed for search queries: <li />base_dn <li />attributes - array, the attributes that shall be returned <li />attrsonly <li />sizelimit - integer, the max number of results to be returned <li />timelimit - integer, the timelimit after which to stop searching <li />deref - <li/>sort - string, which tells the attribute name by which to sort I.e.:
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:41:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|