Class: myldap
Source Location: /templates/3rdParty/pla/lib/ds_myldap.php
DS
|
--myldap
This abstract class provides the basic variables and methods for LDAP datastores
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 15]
This abstract class provides the basic variables and methods for LDAP datastores
Class Methods
constructor __construct [line 25]
method connect [line 129]
resource|null connect(
string
$method, [
$debug = false], [
$new = false])
|
|
Connect and Bind to the Database
Tags:
Overrides DS::connect() (This will make the connection to the datasource)
Parameters:
method dnExists [line 839]
boolean dnExists(
string
$dn, [string
$method = null])
|
|
Gets whether an entry exists based on its DN. If the entry exists, returns true. Otherwise returns false.
Tags:
Parameters:
method escapeDN [line 1083]
Parse a DN and escape any special characters
Tags:
Parameters:
method getBaseDN [line 789]
array getBaseDN(
[string
$method = null])
|
|
Gets the root DN of the specified LDAPServer, or null if it can't find it (ie, the server won't give it to us, or it isnt specified in the configuration file). Tested with OpenLDAP 2.0, Netscape iPlanet, and Novell eDirectory 8.7 (nldap.com) Please report any and all bugs!! Please note: On FC systems, it seems that php_ldap uses /etc/openldap/ldap.conf in the search base if it is blank - so edit that file and comment out the BASE line.
Tags:
Parameters:
method getContainer [line 930]
string getContainer(
string
$dn)
|
|
Given a DN string, this returns the parent container portion of the string. For example. given 'cn=Manager,dc=example,dc=com', this function returns 'dc=example,dc=com'.
Tags:
Parameters:
method getContainerContents [line 985]
array getContainerContents(
string
$dn, [string
$method = null], [int
$size_limit = 0], [string
$filter = '(objectClass=*)'], [constant
$deref = LDAP_DEREF_NEVER])
|
|
Gets a list of child entries for an entry. Given a DN, this function fetches the list of DNs of child entries one level beneath the parent. For example, for the following tree: dc=example,dc=com
ou=People
cn=Dave
cn=Fred
cn=Joe
ou=More People
cn=Mark
cn=Bob
Calling
would return the following list: cn=Dave
cn=Fred
cn=Joe
ou=More People
Tags:
Parameters:
method getContainerPath [line 883]
string getContainerPath(
string
$dn, [string
$path = '..'])
|
|
Given a DN string and a path like syntax, this returns the parent container portion of the string.
Tags:
Parameters:
method getContainerTop [line 857]
string getContainerTop(
string
$dn)
|
|
Given a DN string, this returns the top container portion of the string.
Tags:
Parameters:
method getDNAttrValue [line 1943]
array getDNAttrValue(
string
$dn, string
$attr, [string
$method = null], [constant
$deref = LDAP_DEREF_NEVER])
|
|
Much like getDNAttrValues(), but only returns the values for one attribute of an object. Example calls:
Array (
[0] => Smith
)
Array (
[0] => top
[1] => person
)
Tags:
Parameters:
method getDNAttrValues [line 1997]
array getDNAttrValues(
string
$dn, [string
$method = null], [constant
$deref = LDAP_DEREF_NEVER], [
$attrs = array('*','+')])
|
|
Gets the attributes/values of an entry. Returns an associative array whose keys are attribute value names and whose values are arrays of values for said attribute. Optionally, callers may specify true for the parameter $lower_case_attr_names to force all keys in the associate array (attribute names) to be lower case. Example of its usage:
Array (
[objectClass] => Array (
[0] => person
[1] => top
)
[cn] => Array (
[0] => Bob
)
[sn] => Array (
[0] => Jones
)
[dn] => Array (
[0] => cn=Bob,ou=pepole,dc=example,dc=com
)
)
Tags:
Parameters:
method getErrorMessage [line 444]
void getErrorMessage(
[string
$method = null])
|
|
Get the last error string
Tags:
Overrides DS::getErrorMessage() (Return error details from previous operation)
Parameters:
method getErrorNum [line 456]
void getErrorNum(
[string
$method = null])
|
|
Get the last error number
Tags:
Overrides DS::getErrorNum() (parent method not documented)
Parameters:
method getLoginID [line 471]
void getLoginID(
string
$user, [
$method = null])
|
|
Get a user ID
Tags:
Parameters:
method getRootDSE [line 1120]
void getRootDSE(
[
$method = null])
|
|
Tags:
Parameters:
method getSchemaAttribute [line 1513]
AttributeType getSchemaAttribute(
$attr_name, [
$method = null], [string
$dn = ''], string
$oclass_name)
|
|
Gets a single AttributeType object specified by name.
Tags:
Parameters:
method getSchemaObjectClass [line 1482]
ObjectClass getSchemaObjectClass(
string
$oclass_name, [
$method = null], [string
$dn = ''])
|
|
Gets a single ObjectClass object specified by name.
Tags:
Parameters:
method isAnonBindAllowed [line 527]
void isAnonBindAllowed(
)
|
|
Return if anonymous bind is allowed in the configuration
Tags:
Overridden in child classes as:
- ldap_pla::isAnonBindAllowed()
- Fetch whether the user has configured a certain server login to be non anonymous
method isAttrBinary [line 2153]
boolean isAttrBinary(
string
$attr_name)
|
|
Given an attribute name and server ID number, this function returns whether the attribute may contain binary data. This is useful for developers who wish to display the contents of an arbitrary attribute but don't want to dump binary data on the page.
Tags:
Parameters:
method isAttrBoolean [line 2127]
boolean isAttrBoolean(
string
$attr_name)
|
|
Given an attribute name and server ID number, this function returns whether the attrbiute contains boolean data. This is useful for developers who wish to display the contents of a boolean attribute with a drop-down.
Parameters:
method isDNAttr [line 2055]
boolean isDNAttr(
string
$attr_name, [
$method = null])
|
|
Returns true if the attribute specified is required to take as input a DN. Some examples include 'distinguishedName', 'member' and 'uniqueMember'.
Parameters:
method isForceMay [line 1908]
boolean isForceMay(
$attr_name)
|
|
This function determines if the specified attribute is contained in the force_may list as configured in config.php.
Tags:
Parameters:
method isJpegPhoto [line 2096]
boolean isJpegPhoto(
string
$attr_name)
|
|
Used to determine if the specified attribute is indeed a jpegPhoto. If the specified attribute is one that houses jpeg data, true is returned. Otherwise this function returns false.
Tags:
Parameters:
method login [line 247]
boolean login(
[
$user = null], [
$pass = null], [
$method = null], [
$new = false])
|
|
Login to the database with the application user/password
Tags:
Overrides DS::login() (Login to the datastore method: default = anon, connect to ds using bind_id not auth_id.)
Parameters:
method MatchingRules [line 1780]
void MatchingRules(
[
$method = null], [
$dn = ''])
|
|
Returns an array of MatchingRule objects for the specified server. The key of each entry is the OID of the matching rule.
Tags:
Parameters:
method modify [line 766]
void modify(
$dn,
$attrs, [
$method = null])
|
|
Modify attributes of a DN
Tags:
Overridden in child classes as:
- ldap_pla::modify()
- Modify objects
Parameters:
method query [line 311]
array|null query(
string
$query, string
$method, [string
$index = null], [boolean
$debug = false])
|
|
Perform a query to the Database
Tags:
Overrides DS::query() (Query the datasource)
Parameters:
method SchemaAttributes [line 1601]
array SchemaAttributes(
[
$method = null], [string
$dn = ''])
|
|
Gets an associative array of AttributeType objects for the specified server. Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object.
Tags:
Parameters:
method SchemaObjectClasses [line 1545]
array SchemaObjectClasses(
[
$method = null], [string
$dn = ''])
|
|
Gets an associative array of ObjectClass objects for the specified server. Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object.
Tags:
Parameters:
method SchemaSyntaxes [line 1856]
void SchemaSyntaxes(
[
$method = null], [
$dn = ''])
|
|
Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions. The key of each entry is the OID of the Syntax.
Tags:
Parameters:
method userIsAllowedLogin [line 2270]
void userIsAllowedLogin(
$dn)
|
|
This function will determine if the user is allowed to login based on a filter
Tags:
Parameters:
method userIsMember [line 2239]
bool userIsMember(
string
$user, dn
$group)
|
|
This function will test if a user is a member of a group. Inputs:
Tags:
Parameters:
|