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

Class: XML_Query2XML_Driver

Source Location: /XML_Query2XML-1.6.0/XML/Query2XML.php

Class Overview


Abstract driver class.


Author(s):

Version:

  • Release: 1.6.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 2519]
Abstract driver class.

usage:

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



[ Top ]


Method Detail

factory   [line 2589]

XML_Query2XML_Driver factory( mixed $backend)

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 or Net_LDAP.
  • Access: public

Parameters:

mixed   $backend   —  An instance of MDB2_Driver_Common, PDO, DB_common, ADOConnection or Net_LDAP.

[ Top ]

getAllRecords   [line 2534]

array getAllRecords( mixed $sql, string $configPath)

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

Parameters:

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

[ Top ]

preprocessQuery   [line 2548]

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

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

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

Parameters:

mixed   &$query   —  A string or an array containing the element 'query'.
string   $configPath   —  The config path; used for exception messages.

[ Top ]


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