Class XML_Query2XML_Driver_LDAP2

Description

Driver for Net_LDAP2.

usage:

  1.  $driver XML_Query2XML_Driver::factory(new Net_LDAP2(...));

This LDAP driver is built upon PEAR Net_LDAP2 and provides three features:

  • prepare & execute like usage of placeholders in "base" and "filter"
  • handling missing attributes in LDAP an entity does not have to use all available attributes, while XML_Query2XML expects every record to have the same columns; this driver solves the problem by setting all missing columns to null.
  • handling multi-value attributes XML_Query2XML expects every record to be a one-dimensional associative array. In order to achieve this result this driver creates as many records for each LDAP entry as are necassary to accomodate all values of an attribute.

Located in /Query2XML/Driver/LDAP2.php (line 65)

XML_Query2XML_Driver
   |
   --XML_Query2XML_Driver_LDAP2
Method Summary
XML_Query2XML_Driver_LDAP2 __construct ( $ldap)
array getAllRecords (mixed $query, string $configPath)
string preprocessQuery (array &$query, string $configPath)
Methods
Constructor __construct (line 78)

Constructor

  • access: public
XML_Query2XML_Driver_LDAP2 __construct ( $ldap)
  • Net_LDAP2 $ldap: An instance of PEAR Net_LDAP2.
getAllRecords (line 134)

Execute a LDAP query stement and fetch all results.

array getAllRecords (mixed $query, string $configPath)
  • mixed $query: The SQL query as a string or an array.
  • string $configPath: The config path; used for exception messages.

Redefinition of:
XML_Query2XML_Driver::getAllRecords()
This method, when implemented executes the query passed as the first argument and returns all records from the result set.
preprocessQuery (line 92)

Pre-processes LDAP query specifications.

  • return: A string representation of $query
  • access: public
string preprocessQuery (array &$query, string $configPath)
  • array &$query: An array optionally containing the elements 'base', 'filter', 'options' and 'data'.
  • string $configPath: The config path; used for exception messages.

Redefinition of:
XML_Query2XML_Driver::preprocessQuery()
Pre-processes a query specification and returns a string representation of the query.

Inherited Methods

Inherited From XML_Query2XML_Driver

XML_Query2XML_Driver::factory()
XML_Query2XML_Driver::getAllRecords()
XML_Query2XML_Driver::preprocessQuery()

Documentation generated on Sun, 03 Apr 2011 13:13:09 +0200 by phpDocumentor 1.4.1