Class XML_Query2XML_Driver

Description

Abstract driver class.

usage:

  1.  $driver XML_Query2XML_Driver::factory($backend);

Located in /Query2XML.php (line 2564)


	
			
Direct descendents
Class Description
XML_Query2XML_Driver_ADOdb Driver for the database abstraction layer ADOdb.
XML_Query2XML_Driver_Array Array-based driver.
XML_Query2XML_Driver_DB Driver for the database abstraction layer PEAR DB.
XML_Query2XML_Driver_LDAP Driver for Net_LDAP.
XML_Query2XML_Driver_LDAP2 Driver for Net_LDAP2.
XML_Query2XML_Driver_MDB2 Driver for the database abstraction layer PEAR MDB2.
XML_Query2XML_Driver_PDO Driver for the database abstraction layer PDO.
Method Summary
static XML_Query2XML_Driver factory (mixed $backend)
array getAllRecords (mixed $sql, string $configPath)
string preprocessQuery (mixed &$query, string $configPath)
Methods
static factory (line 2638)

Factory method.

  • return: An instance of a driver class that extends XML_Query2XML_Driver.
  • throws: XML_Query2XML_DriverException If $backend already is a PEAR_Error.
  • throws: XML_Query2XML_ConfigException If $backend is not an instance of a child class of MDB2_Driver_Common, PDO, DB_common, ADOConnection, Net_LDAP2 or Net_LDAP.
  • access: public
static XML_Query2XML_Driver factory (mixed $backend)
  • mixed $backend: An instance of MDB2_Driver_Common, PDO, DB_common, ADOConnection, Net_LDAP2 or Net_LDAP.

Redefined in descendants as:
getAllRecords (line 2579)

This method, when implemented executes the query passed as the first argument and returns all records from the result set.

The format of the first argument depends on the driver being used.

  • return: An array of records. Each record itself will be an associative array.
  • abstract:
  • throws: XML_Query2XML_DriverException If some driver related error occures.
  • access: public
array getAllRecords (mixed $sql, string $configPath)
  • mixed $sql: The SQL query as a string or an array.
  • string $configPath: The config path; used for exception messages.

Redefined in descendants as:
preprocessQuery (line 2597)

Pre-processes a query specification and returns a string representation of the query.

The returned string will be used for logging purposes. It does not need to be valid SQL.

If $query is a string, it will be changed to array('query' => $query).

  • return: The query statement as a string.
  • throws: XML_Query2XML_ConfigException If $query is an array but does not contain the element 'query'.
  • access: public
string preprocessQuery (mixed &$query, string $configPath)
  • mixed &$query: A string or an array containing the element 'query'.
  • string $configPath: The config path; used for exception messages.

Redefined in descendants as:

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