XML_Query2XML
[ class tree: XML_Query2XML ] [ index: XML_Query2XML ] [ all elements ]

Class: XML_Query2XML_Driver_LDAP2

Source Location: /XML_Query2XML-1.7.2/XML/Query2XML/Driver/LDAP2.php

Class Overview

XML_Query2XML_Driver
   |
   --XML_Query2XML_Driver_LDAP2

Driver for Net_LDAP2.


Author(s):

Version:

  • Release: 1.7.2

Copyright:

  • 2006 Lukas Feiler

Methods


Inherited Variables

Inherited Methods

Class: XML_Query2XML_Driver

XML_Query2XML_Driver::factory()
Factory method.
XML_Query2XML_Driver::getAllRecords()
This method, when implemented executes the query passed as the first argument and returns all records from the result set.
XML_Query2XML_Driver::preprocessQuery()
Pre-processes a query specification and returns a string representation of the query.

Class Details

[line 65]
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.



[ Top ]


Method Detail

__construct (Constructor)   [line 78]

XML_Query2XML_Driver_LDAP2 __construct( Net_LDAP2 $ldap)

Constructor
  • Access: public

Parameters:

Net_LDAP2   $ldap   —  An instance of PEAR Net_LDAP2.

[ Top ]

getAllRecords   [line 134]

array getAllRecords( mixed $query, string $configPath)

Execute a LDAP query stement and fetch all results.

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

Parameters:

mixed   $query   —  The SQL query as a string or an array.
string   $configPath   —  The config path; used for exception messages.

[ Top ]

preprocessQuery   [line 92]

string preprocessQuery( array &$query, string $configPath)

Pre-processes LDAP query specifications.
  • Return: A string representation of $query
  • Access: public

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

Parameters:

array   &$query   —  An array optionally containing the elements 'base', 'filter', 'options' and 'data'.
string   $configPath   —  The config path; used for exception messages.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:43:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.