Index by title
Configuration¶
LDAP¶
Userinterface¶
Controllers¶
Dataaccess¶
Access to LDAP is solved throught a ORM style interface called LDM.
Helpers¶
Ltool¶
basedn()¶
Returns the basedn specified in the ldap config
escape($str,$all = FALSE)¶
Escapes LDAP filter strings according to RFC2254
By default it does not escape the '*' character to keep wildcard search support.
Arguments:
- String $str: The string to escape
- Boolean $all (false): Set this to true to also escape the wildcard character '*'
Examples:
echo Ltool:: escape('(attribute=\abc*)');
// (attribute=\5cabc*)
echo Ltool:: escape('(attribute=\abc*)',TRUE);
// (attribute=\5cabc\2A)
Models¶
Create a Model
group¶
alias for groupofnames
groupofnames¶
organizationalrole¶
organizationalunit¶
person¶
Alias for ppsperson
ppsperson¶
role¶
Alias for organizationalrole
unit¶
Alias for organizationalunit
Model HowTo¶
- Create a new PHP file and name it the same as your LDAP objectclass.
- Create a new PHP class within these file named as your LDAP objectclass prefixed by "Model_" and extending LDM
The objectclass must begin with a Capital
class Model_Objectclassextends LDM
{
…
}
- Add the protected attribute $_attributesas as an associative array containing all LDAP attributes initialized with null.
Group the attributes by internal, required and optional with a leading comment.
Sort the atributes alphabetical.
…
/*
* List of attributes
*/
protected $_attributes = array(
//Internal
'createTimestamp' => null,
…
//Required
'cn' => array(),
…
//Optional
'businessCategory' => array(),
…
);
…
- Add the protected attribute $_referers as array containing all LDAP attributes which holds a DN to another LDAP object.
Sort the atributes alphabetical.
…
/*
* List of attributes holding a dn to an other object
*/
protected $_referers = array(
'member',
…
);
…
- Add the protected attribute $_protected as array containing all LDAP attributes which are read only.
Group the attributes by internal, required and optional with a leading comment.
Sort the atributes alphabetical.
…
/*
* protected attributes are read only
*/
protected $_protected = array(
//Internal
'createTimestamp',
…
);
…
- Add the protected attribute $_multivalues as array containing all LDAP attributes which can hold one or more values.
Group the attributes by internal, required and optional with a leading comment.
Sort the atributes alphabetical.
…
/*
* List of multivalue attributes
*/
protected $_multivalues = array(
//Required
'cn',
…
//Optional
'businessCategory',
…
);
…
- Add the protected attribute $_object_class containing the LDAP objectclass as string.
…
/*
* The object class must be set on each model. It corresponds with the internal
* LDAP attribute 'structuralObjectClass'.
*/
protected $_object_class = 'objectclass';
…
- Add the protected attribute $_primary_key containing the RDN of the LDAP object as string.
…
/*
* Primary key can be used when creating objects with factory class
* Example: $group = Dobject::factory('group', 'some value for the primary key');
* Note: The primary key must be an unique value
*/
protected $_primary_key = 'cn';
…
- Create an empty class extending the just created one with a shorter or more speakable name.
This step is optional. Is is only used to make life easier while programming.
class Model_Shortname extends Model_Objectclass {}
Version 0.1¶
This version will provide the utmost basic functionality.
Datamanipulation¶
Creation, manipulation and removal of
Forms¶
- Member application
- Password reset
Version 0.2¶
Account registration for non members.
Forms¶
Views¶
MDB GUI Developer Documentation¶
Topics in this Wiki:
Versions¶