Interface IConnectorThe IConnector interface defines the function signatures and the constants for all connector classes.
If you want your application to run with different types of databases, you may ONLY use the functions defined here.
You may implement additional IConnector classes from scratch using this interface, but that is not recommended. Mostly, you'll want to extend the abstract BaseConnector class.
Located in /IConnector.php (line 53)
int
delete
(string $query, [array $param = array()], [array $map = array()], [array $options = array()])
int
insert
(string $query, [array $param = array()], [array $map = array()], [array $options = array()])
array
select
(string $query, [array $param = array()], [array $map = array()], [array $options = array()])
int
update
(string $query, [array $param = array()], [array $map = array()], [array $options = array()])
Commits the current transaction on the current connection.
The current transaction includes all statements on the connection that were executed after the call to transaction() and before any calls to rollback() or commit().
Send a SQL DELETE query to the database and get the number of rows deleted by the query.
Get the database link identifier used by the IConnector instance.
Get an array of all currently used options or the value of the option defined in the optional $element parameter.
Send a SQL INSERT query to the database and get the IDENTITY ID generated from the last INSERT operation (if any).
Rolls back the current transaction on the current connection.
The current transaction includes all statements on the connection that were executed after the call to transaction() and before any calls to rollback() or commit().
Send a SQL SELECT query to the database and get the query result.
As a default, this function returns a table as a numeric array of rows. Each row is an associated array. The array keys in the rows correspond to the column names of your query.
Set one or more options for the IConnector instance.
Some options are only valid as constructor or function options.
Begins a transaction on the current connection.
The current transaction includes all statements on the connection that were executed after the call to transaction() and before any calls to rollback() or commit().
Send a SQL UPDATE query to the database and get the number of rows updates by the query.
CHAR_APPLICATION
= "charApplication"
(line 94)
Set this option to the character set being used by your application.
CHAR_DATABASE
= "charDatabase"
(line 99)
Set this option to the character set being used by your database(s).
CONN_CHARSET
= "connCharset"
(line 59)
The name of the connection character set (used by MySQL).
CONN_DATABASE
= "connDatabase"
(line 64)
The name of the default database to use or a ODBC Data Source.
CONN_DRIVER
= "connDriver"
(line 86)
CONN_HOSTNAME
= "connHostname"
(line 69)
The name of the server host to connect to (ignored by ODBC).
CONN_NATIVE
= "connNative"
(line 88)
CONN_PASSWORD
= "connPassword"
(line 74)
The database password. Leave empty (null) to use Windows authentification.
CONN_PERSISTENT
= "connPersistent"
(line 79)
Opens a persistent connection to a database when true.
CONN_POOL
= "connPool"
(line 89)
CONN_PORT
= "connPort"
(line 87)
CONN_USERNAME
= "connUsername"
(line 84)
The database user name. Leave empty (null) to use Windows authentification.
LOG_DEBUG
= "logDebug"
(line 104)
Writes debug information in the php log file when true.
LOG_ERROR
= "logError"
(line 109)
Error information is written in the php log file when true.
PARAM_CAST_NUMERIC
= "paramCastNumeric"
(line 114)
Set this option to true to cast numeric strings to int or float.
PARAM_NAMED
= "paramNamed"
(line 119)
True, when named placeholders are used, false otherwise.
PARAM_PREFIX
= "paramPrefix"
(line 124)
The parameter prefix to be used in parameterized queries.
PARAM_QUERIES
= "paramQueries"
(line 130)
Set this option to true to send sql statements as parameterized queries to the database.
PARAM_STRIP_MAGIC
= "paramStripMagic"
(line 135)
Strips magic quotes from string parameters when true.
PARAM_STRIP_TAGS
= "paramStripTags"
(line 140)
Strips all PHP and HTML tags from string parameters when true.
PARAM_TRIM
= "paramTrim"
(line 145)
Removes leading and trailing white space from string parameters when true.
RESULT_CACHE
= "resultCache"
(line 151)
Enables internal caching of all tables (query results) returned by the select() function when true.
RESULT_KEY_FIELD
= "resultKeyField"
(line 158)
When defined, the select() function returns the query result table as an ASSOCIATED array of rows (which again are associated arrays).
RESULT_LENGTH
= "resultLength"
(line 163)
The maximum number of rows returend by the select() method.
RESULT_OFFSET
= "resultOffset"
(line 169)
The number of rows to skip from the beginning of query result table returned by the select() method.
Documentation generated on Wed, 03 Jun 2009 12:41:51 +0200 by phpDocumentor 1.4.1