Doctrine 1.2.4
Doctrine_Connection_Db2 Class Reference

Inherits Doctrine_Connection_Common.

Public Member Functions

 __get ($name)
 
 __toString ()
 
 addListener ($listener, $name=null)
 
 addRecordListener ($listener, $name=null)
 
 addTable (Doctrine_Table $table)
 
 beginTransaction ($savepoint=null)
 
 bind ($name, $resource)
 
 clear ()
 
 close ()
 
 commit ($savepoint=null)
 
 connect ()
 
 convertBooleans ($item)
 
 count ()
 
 create ($name)
 
 createDatabase ()
 
 createQuery ()
 
 delete (Doctrine_Table $table, array $identifier)
 
 driverName ($name)
 
 dropDatabase ()
 
 errorCode ()
 
 errorInfo ()
 
 evictTables ()
 
 exec ($query, array $params=array())
 
 execute ($query, array $params=array())
 
 fetchAll ($statement, array $params=array())
 
 fetchArray ($statement, array $params=array())
 
 fetchAssoc ($statement, array $params=array())
 
 fetchBoth ($statement, array $params=array())
 
 fetchColumn ($statement, array $params=array(), $colnum=0)
 
 fetchOne ($statement, array $params=array(), $colnum=0)
 
 fetchRow ($statement, array $params=array())
 
 flush ()
 
 generateUniqueIndexName ($tableName, $fields)
 
 generateUniqueRelationForeignKeyName (Doctrine_Relation $relation)
 
 getAttribute ($attribute)
 
 getAttributes ()
 
 getCharset ()
 
 getCollate ()
 
 getDbh ()
 
 getDriverName ()
 
 getImpl ($template)
 
 getIterator ()
 
 getListener ()
 
 getLocator ()
 
 getManager ()
 
 getName ()
 
 getOption ($option)
 
 getOptions ()
 
 getParent ()
 
 getQueryCacheDriver ()
 
 getRecordListener ()
 
 getResultCacheDriver ()
 
 getTable ($name)
 
 getTables ()
 
 getTmpConnection ($info)
 
 getTransactionLevel ()
 
 hasTable ($name)
 
 insert (Doctrine_Table $table, array $fields)
 
 isConnected ()
 
 lastInsertId ($table=null, $field=null)
 
 locate ($name)
 
 modifyLimitQuery ($query, $limit=false, $offset=false, $isManip=false)
 
 modifyLimitSubquery (Doctrine_Table $rootTable, $query, $limit=false, $offset=false, $isManip=false)
 
 prepare ($statement)
 
 query ($query, array $params=array(), $hydrationMode=null)
 
 queryOne ($query, array $params=array())
 
 quote ($input, $type=null)
 
 quoteIdentifier ($str, $checkOption=true)
 
 quoteMultipleIdentifier ($arr, $checkOption=true)
 
 replace (Doctrine_Table $table, array $fields, array $keys)
 
 rethrowException (Exception $e, $invoker, $query=null)
 
 rollback ($savepoint=null)
 
 select ($query, $limit=0, $offset=0)
 
 serialize ()
 
 setAttribute ($attribute, $value)
 
 setCharset ($charset)
 
 setCollate ($collate)
 
 setDateFormat ($format=null)
 
 setEventListener ($listener)
 
 setImpl ($template, $class)
 
 setListener ($listener)
 
 setLocator (Doctrine_Locator $locator)
 
 setName ($name)
 
 setOption ($option, $value)
 
 setParent (Doctrine_Configurable $component)
 
 setRecordListener ($listener)
 
 standaloneQuery ($query, $params=array())
 
 supports ($feature)
 
 unserialize ($serialized)
 
 unsetAttribute ($attribute)
 
 update (Doctrine_Table $table, array $fields, array $identifier)
 

Static Public Member Functions

static getAvailableDrivers ()
 
static getNullObject ()
 
static getSupportedDrivers ()
 
static initNullObject (Doctrine_Null $null)
 

Protected Attributes

 $_name
 
 $driverName
 

Detailed Description

Definition at line 33 of file Db2.php.

Member Function Documentation

Doctrine_Connection::__get (   $name)
inherited

__get lazy loads given module and returns it

See Also
Doctrine_DataDict
Doctrine_Expression_Driver
Doctrine_Export
Doctrine_Transaction
Doctrine_Connection::$modules all availible modules
Parameters
string$namethe name of the module to get
Exceptions
Doctrine_Connection_Exceptionif trying to get an unknown module
Returns
Doctrine_Connection_Module connection module

Definition at line 399 of file Connection.php.

{
if (isset($this->properties[$name])) {
return $this->properties[$name];
}
if ( ! isset($this->modules[$name])) {
throw new Doctrine_Connection_Exception('Unknown module / property ' . $name);
}
if ($this->modules[$name] === false) {
switch ($name) {
case 'unitOfWork':
$this->modules[$name] = new Doctrine_Connection_UnitOfWork($this);
break;
case 'formatter':
$this->modules[$name] = new Doctrine_Formatter($this);
break;
default:
$class = 'Doctrine_' . ucwords($name) . '_' . $this->getDriverName();
$this->modules[$name] = new $class($this);
}
}
return $this->modules[$name];
}
Doctrine_Connection::__toString ( )
inherited

returns a string representation of this object

Returns
string

Definition at line 1552 of file Connection.php.

Doctrine_Configurable::addListener (   $listener,
  $name = null 
)
inherited

addListener

Parameters
Doctrine_EventListener_Interface | Doctrine_Overloadable$listener
Returns
Doctrine_Configurable this object

Definition at line 277 of file Configurable.php.

{
if ( ! isset($this->attributes[Doctrine_Core::ATTR_LISTENER]) ||
! ($this->attributes[Doctrine_Core::ATTR_LISTENER] instanceof Doctrine_EventListener_Chain)) {
$this->attributes[Doctrine_Core::ATTR_LISTENER] = new Doctrine_EventListener_Chain();
}
$this->attributes[Doctrine_Core::ATTR_LISTENER]->add($listener, $name);
return $this;
}
Doctrine_Configurable::addRecordListener (   $listener,
  $name = null 
)
inherited

addRecordListener

Parameters
Doctrine_EventListener_Interface | Doctrine_Overloadable$listener
Returns
Doctrine_Configurable this object

Definition at line 225 of file Configurable.php.

{
if ( ! isset($this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER]) ||
! ($this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER] instanceof Doctrine_Record_Listener_Chain)) {
$this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER] = new Doctrine_Record_Listener_Chain();
}
$this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER]->add($listener, $name);
return $this;
}
Doctrine_Connection::addTable ( Doctrine_Table  $table)
inherited

addTable adds a Doctrine_Table object into connection registry

Parameters
$tablea Doctrine_Table object to be added into registry
Returns
boolean

Definition at line 1176 of file Connection.php.

{
$name = $table->getComponentName();
if (isset($this->tables[$name])) {
return false;
}
$this->tables[$name] = $table;
return true;
}
Doctrine_Connection::beginTransaction (   $savepoint = null)
inherited

beginTransaction Start a transaction or set a savepoint.

if trying to set a savepoint and there is no active transaction a new transaction is being started

Listeners: onPreTransactionBegin, onTransactionBegin

Parameters
string$savepointname of a savepoint to set
Exceptions
Doctrine_Transaction_Exceptionif the transaction fails at database level
Returns
integer current transaction nesting level

Definition at line 1370 of file Connection.php.

{
return $this->transaction->beginTransaction($savepoint);
}
Doctrine_Locator_Injectable::bind (   $name,
  $resource 
)
inherited

bind binds a resource to a name

Parameters
string$namethe name of the resource to bind
mixed$valuethe value of the resource
Returns
Doctrine_Locator this object

Definition at line 120 of file Injectable.php.

{
$this->_resources[$name] = $resource;
return $this;
}
Doctrine_Connection::clear ( )
inherited

clear clears all repositories

Returns
void

Definition at line 1236 of file Connection.php.

{
foreach ($this->tables as $k => $table) {
$table->getRepository()->evictAll();
$table->clear();
}
}
Doctrine_Connection::close ( )
inherited

close closes the connection

Returns
void

Definition at line 1262 of file Connection.php.

{
$event = new Doctrine_Event($this, Doctrine_Event::CONN_CLOSE);
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->preClose($event);
$this->clear();
unset($this->dbh);
$this->isConnected = false;
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->postClose($event);
}
Doctrine_Connection::commit (   $savepoint = null)
inherited

commit Commit the database changes done during a transaction that is in progress or release a savepoint. This function may only be called when auto-committing is disabled, otherwise it will fail.

Listeners: onPreTransactionCommit, onTransactionCommit

Parameters
string$savepointname of a savepoint to release
Exceptions
Doctrine_Transaction_Exceptionif the transaction fails at PDO level
Doctrine_Validator_Exceptionif the transaction fails due to record validations
Returns
boolean false if commit couldn't be performed, true otherwise

Definition at line 1393 of file Connection.php.

{
return $this->transaction->commit($savepoint);
}
Doctrine_Connection::connect ( )
inherited

connect connects into database

Returns
boolean

Definition at line 453 of file Connection.php.

{
if ($this->isConnected) {
return false;
}
$event = new Doctrine_Event($this, Doctrine_Event::CONN_CONNECT);
$this->getListener()->preConnect($event);
$e = explode(':', $this->options['dsn']);
$found = false;
if (extension_loaded('pdo')) {
if (in_array($e[0], self::getAvailableDrivers())) {
try {
$this->dbh = new PDO($this->options['dsn'], $this->options['username'],
(!$this->options['password'] ? '':$this->options['password']), $this->options['other']);
$this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
throw new Doctrine_Connection_Exception('PDO Connection Error: ' . $e->getMessage());
}
$found = true;
}
}
if ( ! $found) {
$class = 'Doctrine_Adapter_' . ucwords($e[0]);
if (class_exists($class)) {
$this->dbh = new $class($this->options['dsn'], $this->options['username'], $this->options['password'], $this->options);
} else {
throw new Doctrine_Connection_Exception("Couldn't locate driver named " . $e[0]);
}
}
// attach the pending attributes to adapter
foreach($this->pendingAttributes as $attr => $value) {
// some drivers don't support setting this so we just skip it
if ($attr == Doctrine_Core::ATTR_DRIVER_NAME) {
continue;
}
$this->dbh->setAttribute($attr, $value);
}
$this->isConnected = true;
$this->getListener()->postConnect($event);
return true;
}
Doctrine_Connection::convertBooleans (   $item)
inherited

convertBooleans some drivers need the boolean values to be converted into integers when using DQL API

This method takes care of that conversion

Parameters
array$item
Returns
void

Definition at line 762 of file Connection.php.

{
return $this->formatter->convertBooleans($item);
}
Doctrine_Connection::count ( )
inherited

returns the count of initialized table objects

Returns
integer

Definition at line 1164 of file Connection.php.

{
return $this->_count;
}
Doctrine_Connection::create (   $name)
inherited

create creates a record

create creates a record

Parameters
string$namecomponent name
Returns
Doctrine_Record Doctrine_Record object

Definition at line 1195 of file Connection.php.

{
return $this->getTable($name)->create();
}
Doctrine_Connection::createDatabase ( )
inherited

createDatabase

Issue create database command for this instance of Doctrine_Connection

Returns
string Doctrine_Exception catched in case of failure

Definition at line 1424 of file Connection.php.

{
if ( ! $dsn = $this->getOption('dsn')) {
throw new Doctrine_Connection_Exception('You must create your Doctrine_Connection by using a valid Doctrine style dsn in order to use the create/drop database functionality');
}
// Parse pdo dsn so we are aware of the connection information parts
$info = $this->getManager()->parsePdoDsn($dsn);
// Get the temporary connection to issue the create database command
$tmpConnection = $this->getTmpConnection($info);
// Catch any exceptions and delay the throwing of it so we can close
// the tmp connection
try {
$tmpConnection->export->createDatabase($info['dbname']);
} catch (Exception $e) {}
// Close the temporary connection used to issue the drop database command
$this->getManager()->closeConnection($tmpConnection);
if (isset($e)) {
throw $e;
}
}
Doctrine_Connection::createQuery ( )
inherited

Creates a new Doctrine_Query object that operates on this connection.

Returns
Doctrine_Query

Definition at line 1205 of file Connection.php.

{
}
Doctrine_Connection::delete ( Doctrine_Table  $table,
array  $identifier 
)
inherited

deletes table row(s) matching the specified identifier

Exceptions
Doctrine_Connection_Exceptionif something went wrong at the database level
Parameters
string$tableThe table to delete data from
array$identifierAn associateve array containing identifier column-value pairs.
Returns
integer The number of affected rows

Definition at line 606 of file Connection.php.

{
$tmp = array();
foreach (array_keys($identifier) as $id) {
$tmp[] = $this->quoteIdentifier($table->getColumnName($id)) . ' = ?';
}
$query = 'DELETE FROM '
. $this->quoteIdentifier($table->getTableName())
. ' WHERE ' . implode(' AND ', $tmp);
return $this->exec($query, array_values($identifier));
}
Doctrine_Connection::driverName (   $name)
inherited

converts given driver name

Parameters

Definition at line 515 of file Connection.php.

{
}
Doctrine_Connection::dropDatabase ( )
inherited

dropDatabase

Issue drop database command for this instance of Doctrine_Connection

Returns
string success string. Doctrine_Exception if operation failed

Definition at line 1457 of file Connection.php.

{
if ( ! $dsn = $this->getOption('dsn')) {
throw new Doctrine_Connection_Exception('You must create your Doctrine_Connection by using a valid Doctrine style dsn in order to use the create/drop database functionality');
}
// Parse pdo dsn so we are aware of the connection information parts
$info = $this->getManager()->parsePdoDsn($dsn);
// Get the temporary connection to issue the drop database command
$tmpConnection = $this->getTmpConnection($info);
// Catch any exceptions and delay the throwing of it so we can close
// the tmp connection
try {
$tmpConnection->export->dropDatabase($info['dbname']);
} catch (Exception $e) {}
// Close the temporary connection used to issue the drop database command
$this->getManager()->closeConnection($tmpConnection);
if (isset($e)) {
throw $e;
}
}
Doctrine_Connection::errorCode ( )
inherited

errorCode Fetch the SQLSTATE associated with the last operation on the database handle

Returns
integer

Definition at line 1292 of file Connection.php.

{
$this->connect();
return $this->dbh->errorCode();
}
Doctrine_Connection::errorInfo ( )
inherited

errorInfo Fetch extended error information associated with the last operation on the database handle

Returns
array

Definition at line 1305 of file Connection.php.

{
$this->connect();
return $this->dbh->errorInfo();
}
Doctrine_Connection::evictTables ( )
inherited

evictTables evicts all tables

Returns
void

Definition at line 1250 of file Connection.php.

{
$this->tables = array();
$this->exported = array();
}
Doctrine_Connection::exec (   $query,
array  $params = array() 
)
inherited

exec

Parameters
string$querysql query
array$paramsquery parameters
Returns
integer

Definition at line 1035 of file Connection.php.

{
$this->connect();
try {
if ( ! empty($params)) {
$stmt = $this->prepare($query);
$stmt->execute($params);
return $stmt->rowCount();
} else {
$event = new Doctrine_Event($this, Doctrine_Event::CONN_EXEC, $query, $params);
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->preExec($event);
if ( ! $event->skipOperation) {
$count = $this->dbh->exec($query);
$this->_count++;
}
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->postExec($event);
return $count;
}
} catch (PDOException $e) { }
$this->rethrowException($e, $this, $query);
}
Doctrine_Connection::execute (   $query,
array  $params = array() 
)
inherited

execute

Parameters
string$querysql query
array$paramsquery parameters
Returns
PDOStatement|Doctrine_Adapter_Statement

Definition at line 999 of file Connection.php.

{
$this->connect();
try {
if ( ! empty($params)) {
$stmt = $this->prepare($query);
$stmt->execute($params);
return $stmt;
} else {
$event = new Doctrine_Event($this, Doctrine_Event::CONN_QUERY, $query, $params);
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->preQuery($event);
if ( ! $event->skipOperation) {
$stmt = $this->dbh->query($query);
$this->_count++;
}
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->postQuery($event);
return $stmt;
}
} catch (PDOException $e) { }
$this->rethrowException($e, $this, $query);
}
Doctrine_Connection::fetchAll (   $statement,
array  $params = array() 
)
inherited

fetchAll

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
Returns
array

Definition at line 798 of file Connection.php.

{
return $this->execute($statement, $params)->fetchAll(Doctrine_Core::FETCH_ASSOC);
}
Doctrine_Connection::fetchArray (   $statement,
array  $params = array() 
)
inherited

fetchArray

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
Returns
array

Definition at line 835 of file Connection.php.

{
return $this->execute($statement, $params)->fetch(Doctrine_Core::FETCH_NUM);
}
Doctrine_Connection::fetchAssoc (   $statement,
array  $params = array() 
)
inherited

fetchAssoc

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
Returns
array

Definition at line 860 of file Connection.php.

{
return $this->execute($statement, $params)->fetchAll(Doctrine_Core::FETCH_ASSOC);
}
Doctrine_Connection::fetchBoth (   $statement,
array  $params = array() 
)
inherited

fetchBoth

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
Returns
array

Definition at line 872 of file Connection.php.

{
return $this->execute($statement, $params)->fetchAll(Doctrine_Core::FETCH_BOTH);
}
Doctrine_Connection::fetchColumn (   $statement,
array  $params = array(),
  $colnum = 0 
)
inherited

fetchColumn

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
int$colnum0-indexed column number to retrieve
Returns
array

Definition at line 848 of file Connection.php.

{
return $this->execute($statement, $params)->fetchAll(Doctrine_Core::FETCH_COLUMN, $colnum);
}
Doctrine_Connection::fetchOne (   $statement,
array  $params = array(),
  $colnum = 0 
)
inherited

fetchOne

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
int$colnum0-indexed column number to retrieve
Returns
mixed

Definition at line 811 of file Connection.php.

{
return $this->execute($statement, $params)->fetchColumn($colnum);
}
Doctrine_Connection::fetchRow (   $statement,
array  $params = array() 
)
inherited

fetchRow

Parameters
string$statementsql query to be executed
array$paramsprepared statement params
Returns
array

Definition at line 823 of file Connection.php.

{
return $this->execute($statement, $params)->fetch(Doctrine_Core::FETCH_ASSOC);
}
Doctrine_Connection::flush ( )
inherited

flush saves all the records from all tables this operation is isolated using a transaction

Exceptions
PDOExceptionif something went wrong at database level
Returns
void

Definition at line 1218 of file Connection.php.

{
try {
$this->beginInternalTransaction();
$this->unitOfWork->saveAll();
$this->commit();
} catch (Exception $e) {
$this->rollback();
throw $e;
}
}
Doctrine_Connection::generateUniqueIndexName (   $tableName,
  $fields 
)
inherited

Get/generate unique index name for a table name and set of fields

Parameters
string$tableNameThe name of the table the index exists
string$fieldsThe fields that makes up the index
Returns
string $indexName The name of the generated index

Definition at line 1612 of file Connection.php.

{
$fields = (array) $fields;
$parts = array($tableName);
$parts = array_merge($parts, $fields);
$key = implode('_', $parts);
$format = $this->getAttribute(Doctrine_Core::ATTR_IDXNAME_FORMAT);
return $this->_generateUniqueName('indexes', $parts, $key, $format, $this->getAttribute(Doctrine_Core::ATTR_MAX_IDENTIFIER_LENGTH));
}
Doctrine_Connection::generateUniqueRelationForeignKeyName ( Doctrine_Relation  $relation)
inherited

Get/generate a unique foreign key name for a relationship

Parameters
Doctrine_Relation$relationRelation object to generate the foreign key name for
Returns
string $fkName

Definition at line 1591 of file Connection.php.

{
$parts = array(
$relation['localTable']->getTableName(),
$relation->getLocalColumnName(),
$relation['table']->getTableName(),
$relation->getForeignColumnName(),
);
$key = implode('_', array_merge($parts, array($relation['onDelete']), array($relation['onUpdate'])));
$format = $this->getAttribute(Doctrine_Core::ATTR_FKNAME_FORMAT);
return $this->_generateUniqueName('foreign_keys', $parts, $key, $format, $this->getAttribute(Doctrine_Core::ATTR_MAX_IDENTIFIER_LENGTH));
}
Doctrine_Connection::getAttribute (   $attribute)
inherited

getAttribute retrieves a database connection attribute

Parameters
integer$attribute
Returns
mixed

Definition at line 281 of file Connection.php.

{
if ($attribute >= 100 && $attribute < 1000) {
if ( ! isset($this->attributes[$attribute])) {
return parent::getAttribute($attribute);
}
return $this->attributes[$attribute];
}
if ($this->isConnected) {
try {
return $this->dbh->getAttribute($attribute);
} catch (Exception $e) {
throw new Doctrine_Connection_Exception('Attribute ' . $attribute . ' not found.');
}
} else {
if ( ! isset($this->pendingAttributes[$attribute])) {
$this->connect();
$this->getAttribute($attribute);
}
return $this->pendingAttributes[$attribute];
}
}
Doctrine_Configurable::getAttributes ( )
inherited

getAttributes returns all attributes as an array

Returns
array

Definition at line 360 of file Configurable.php.

{
return $this->attributes;
}
static Doctrine_Connection::getAvailableDrivers ( )
staticinherited

returns an array of available PDO drivers

Definition at line 309 of file Connection.php.

{
return PDO::getAvailableDrivers();
}
Doctrine_Configurable::getCharset ( )
inherited

Get the charset

Returns
mixed

Definition at line 380 of file Configurable.php.

{
return $this->getAttribute(Doctrine_Core::ATTR_DEFAULT_TABLE_CHARSET);
}
Doctrine_Configurable::getCollate ( )
inherited

Get the collate

Returns
mixed $collate

Definition at line 400 of file Configurable.php.

{
return $this->getAttribute(Doctrine_Core::ATTR_DEFAULT_TABLE_COLLATE);
}
Doctrine_Connection::getDbh ( )
inherited

returns the database handler of which this connection uses

Returns
PDO the database handler

Definition at line 440 of file Connection.php.

{
$this->connect();
return $this->dbh;
}
Doctrine_Connection::getDriverName ( )
inherited

getDriverName

Gets the name of the instance driver

Returns
void

Definition at line 381 of file Connection.php.

{
}
Doctrine_Configurable::getImpl (   $template)
inherited

getImpl returns the implementation for given class

Returns
string name of the concrete implementation

Definition at line 187 of file Configurable.php.

{
if ( ! isset($this->_impl[$template])) {
if (isset($this->parent)) {
return $this->parent->getImpl($template);
}
return null;
}
return $this->_impl[$template];
}
Doctrine_Connection::getIterator ( )
inherited

returns an iterator that iterators through all initialized table objects

foreach ($conn as $index => $table) { print $table; // get a string representation of each table object }

Returns
ArrayIterator SPL ArrayIterator object

Definition at line 1154 of file Connection.php.

{
return new ArrayIterator($this->tables);
}
Doctrine_Configurable::getListener ( )
inherited

getListener

Returns
Doctrine_EventListener_Interface|Doctrine_Overloadable

Definition at line 294 of file Configurable.php.

{
if ( ! isset($this->attributes[Doctrine_Core::ATTR_LISTENER])) {
if (isset($this->parent)) {
return $this->parent->getListener();
}
return null;
}
return $this->attributes[Doctrine_Core::ATTR_LISTENER];
}
Doctrine_Locator_Injectable::getLocator ( )
inherited

getLocator returns the locator associated with this object

if there are no locator locally associated then this method tries to fetch the current global locator

Returns
Doctrine_Locator

Definition at line 75 of file Injectable.php.

{
if ( ! isset($this->_locator)) {
$this->_locator = Doctrine_Locator::instance();
}
return $this->_locator;
}
Doctrine_Connection::getManager ( )
inherited

returns the manager that created this connection

Returns
Doctrine_Manager

Definition at line 430 of file Connection.php.

{
return $this->getParent();
}
Doctrine_Connection::getName ( )
inherited

getName returns the name of this driver

Returns
string the name of this driver

Definition at line 356 of file Connection.php.

{
return $this->_name;
}
static Doctrine_Locator_Injectable::getNullObject ( )
staticinherited

getNullObject returns the null object associated with this object

Returns
Doctrine_Null

Definition at line 145 of file Injectable.php.

{
return self::$_null;
}
Doctrine_Connection::getOption (   $option)
inherited

getOption

Retrieves option

Parameters
string$option
Returns
void

Definition at line 254 of file Connection.php.

{
if (isset($this->options[$option])) {
return $this->options[$option];
}
}
Doctrine_Connection::getOptions ( )
inherited

getOptions

Get array of all options

Returns
void

Definition at line 241 of file Connection.php.

{
return $this->options;
}
Doctrine_Configurable::getParent ( )
inherited

getParent returns the parent of this component

Returns
Doctrine_Configurable

Definition at line 423 of file Configurable.php.

{
return $this->parent;
}
Doctrine_Connection::getQueryCacheDriver ( )
inherited

getQueryCacheDriver

Returns
Doctrine_Cache_Interface

Definition at line 1331 of file Connection.php.

{
if ( ! $this->getAttribute(Doctrine_Core::ATTR_QUERY_CACHE)) {
throw new Doctrine_Exception('Query Cache driver not initialized.');
}
return $this->getAttribute(Doctrine_Core::ATTR_QUERY_CACHE);
}
Doctrine_Configurable::getRecordListener ( )
inherited

getListener

Returns
Doctrine_EventListener_Interface|Doctrine_Overloadable

Definition at line 242 of file Configurable.php.

{
if ( ! isset($this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER])) {
if (isset($this->parent)) {
return $this->parent->getRecordListener();
}
return null;
}
return $this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER];
}
Doctrine_Connection::getResultCacheDriver ( )
inherited

getResultCacheDriver

Returns
Doctrine_Cache_Interface

Definition at line 1317 of file Connection.php.

{
if ( ! $this->getAttribute(Doctrine_Core::ATTR_RESULT_CACHE)) {
throw new Doctrine_Exception('Result Cache driver not initialized.');
}
return $this->getAttribute(Doctrine_Core::ATTR_RESULT_CACHE);
}
static Doctrine_Connection::getSupportedDrivers ( )
staticinherited

Returns an array of supported drivers by Doctrine

Returns
array $supportedDrivers

Definition at line 319 of file Connection.php.

{
return self::$supportedDrivers;
}
Doctrine_Connection::getTable (   $name)
inherited

returns a table object for given component name

Parameters
string$namecomponent name
Returns
Doctrine_Table

Definition at line 1113 of file Connection.php.

{
if (isset($this->tables[$name])) {
return $this->tables[$name];
}
$class = sprintf($this->getAttribute(Doctrine_Core::ATTR_TABLE_CLASS_FORMAT), $name);
if (class_exists($class, $this->getAttribute(Doctrine_Core::ATTR_AUTOLOAD_TABLE_CLASSES)) &&
in_array('Doctrine_Table', class_parents($class))) {
$table = new $class($name, $this, true);
} else {
$tableClass = $this->getAttribute(Doctrine_Core::ATTR_TABLE_CLASS);
$table = new $tableClass($name, $this, true);
}
return $table;
}
Doctrine_Connection::getTables ( )
inherited

returns an array of all initialized tables

Returns
array

Definition at line 1137 of file Connection.php.

{
return $this->tables;
}
Doctrine_Connection::getTmpConnection (   $info)
inherited

getTmpConnection

Create a temporary connection to the database with the user credentials. This is so the user can make a connection to a db server. Some dbms allow connections with no database, but some do not. In that case we have a table which is always guaranteed to exist. Mysql: 'mysql', PostgreSQL: 'postgres', etc. This value is set in the Doctrine_Export_{DRIVER} classes if required

Parameters
string$info
Returns
void

Definition at line 1496 of file Connection.php.

{
$pdoDsn = $info['scheme'] . ':';
if ($info['unix_socket']) {
$pdoDsn .= 'unix_socket=' . $info['unix_socket'] . ';';
}
$pdoDsn .= 'host=' . $info['host'];
if ($info['port']) {
$pdoDsn .= ';port=' . $info['port'];
}
if (isset($this->export->tmpConnectionDatabase) && $this->export->tmpConnectionDatabase) {
$pdoDsn .= ';dbname=' . $this->export->tmpConnectionDatabase;
}
$username = $this->getOption('username');
$password = $this->getOption('password');
$conn = $this->getManager()->openConnection(array($pdoDsn, $username, $password), 'doctrine_tmp_connection', false);
$conn->setOption('username', $username);
$conn->setOption('password', $password);
return $conn;
}
Doctrine_Connection::getTransactionLevel ( )
inherited

get the current transaction nesting level

Returns
integer

Definition at line 1281 of file Connection.php.

{
return $this->transaction->getTransactionLevel();
}
Doctrine_Connection::hasTable (   $name)
inherited

hasTable whether or not this connection has table $name initialized

Parameters
mixed$name
Returns
boolean

Definition at line 1102 of file Connection.php.

{
return isset($this->tables[$name]);
}
static Doctrine_Locator_Injectable::initNullObject ( Doctrine_Null  $null)
staticinherited

initNullObject initializes the null object

Parameters
Doctrine_Null$null
Returns
void

Definition at line 134 of file Injectable.php.

{
self::$_null = $null;
}
Doctrine_Connection::insert ( Doctrine_Table  $table,
array  $fields 
)
inherited

Inserts a table row with specified data.

Parameters
Doctrine_Table$tableThe table to insert data into.
array$valuesAn associative array containing column-value pairs. Values can be strings or Doctrine_Expression instances.
Returns
integer the number of affected rows. Boolean false if empty value array was given,

Definition at line 664 of file Connection.php.

{
$tableName = $table->getTableName();
// column names are specified as array keys
$cols = array();
// the query VALUES will contain either expresions (eg 'NOW()') or ?
$a = array();
foreach ($fields as $fieldName => $value) {
$cols[] = $this->quoteIdentifier($table->getColumnName($fieldName));
if ($value instanceof Doctrine_Expression) {
$a[] = $value->getSql();
unset($fields[$fieldName]);
} else {
$a[] = '?';
}
}
// build the statement
$query = 'INSERT INTO ' . $this->quoteIdentifier($tableName)
. ' (' . implode(', ', $cols) . ')'
. ' VALUES (' . implode(', ', $a) . ')';
return $this->exec($query, array_values($fields));
}
Doctrine_Connection::isConnected ( )
inherited

Check wherther the connection to the database has been made yet

Returns
boolean

Definition at line 229 of file Connection.php.

{
return $this->isConnected;
}
Doctrine_Connection::lastInsertId (   $table = null,
  $field = null 
)
inherited

lastInsertId

Returns the ID of the last inserted row, or the last value from a sequence object, depending on the underlying driver.

Note: This method may not return a meaningful or consistent result across different drivers, because the underlying database may not even support the notion of auto-increment fields or sequences.

Parameters
string$tablename of the table into which a new row was inserted
string$fieldname of the field into which a new row was inserted

Definition at line 1352 of file Connection.php.

{
return $this->sequence->lastInsertId($table, $field);
}
Doctrine_Locator_Injectable::locate (   $name)
inherited

locate locates a resource by given name and returns it

if the resource cannot be found locally this method tries to use the global locator for finding the resource

See Also
Doctrine_Locator::locate()
Exceptions
Doctrine_Locator_Exceptionif the resource could not be found
Parameters
string$namethe name of the resource
Returns
mixed the located resource

Definition at line 96 of file Injectable.php.

{
if (isset($this->_resources[$name])) {
if (is_object($this->_resources[$name])) {
return $this->_resources[$name];
} else {
// get the name of the concrete implementation
$concreteImpl = $this->_resources[$name];
return $this->getLocator()->locate($concreteImpl);
}
} else {
return $this->getLocator()->locate($name);
}
}
Doctrine_Connection_Db2::modifyLimitQuery (   $query,
  $limit = false,
  $offset = false,
  $isManip = false 
)

Adds an driver-specific LIMIT clause to the query

Parameters
string$queryquery to modify
integer$limitlimit the number of rows
integer$offsetstart reading from given offset
Returns
string the modified query

Definition at line 43 of file Db2.php.

{
if ($limit <= 0)
return $query;
if ($offset == 0) {
return $query . ' FETCH FIRST '. (int)$limit .' ROWS ONLY';
} else {
$sqlPieces = explode('from', $query);
$select = $sqlPieces[0];
$table = $sqlPieces[1];
$col = explode('select', $select);
$sql = 'WITH OFFSET AS(' . $select . ', ROW_NUMBER() ' .
'OVER(ORDER BY ' . $col[1] . ') AS doctrine_rownum FROM ' . $table . ')' .
$select . 'FROM OFFSET WHERE doctrine_rownum BETWEEN ' . (int)$offset .
'AND ' . ((int)$offset + (int)$limit - 1);
return $sql;
}
}
Doctrine_Connection::modifyLimitSubquery ( Doctrine_Table  $rootTable,
  $query,
  $limit = false,
  $offset = false,
  $isManip = false 
)
inherited

Creates dbms specific LIMIT/OFFSET SQL for the subqueries that are used in the context of the limit-subquery algorithm.

Returns
string

Definition at line 1542 of file Connection.php.

{
return $this->modifyLimitQuery($query, $limit, $offset, $isManip);
}
Doctrine_Connection::prepare (   $statement)
inherited

prepare

Parameters
string$statement

Definition at line 908 of file Connection.php.

{
$this->connect();
try {
$event = new Doctrine_Event($this, Doctrine_Event::CONN_PREPARE, $statement);
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->prePrepare($event);
$stmt = false;
if ( ! $event->skipOperation) {
$stmt = $this->dbh->prepare($statement);
}
$this->getAttribute(Doctrine_Core::ATTR_LISTENER)->postPrepare($event);
return new Doctrine_Connection_Statement($this, $stmt);
} catch(PDOException $e) { }
$this->rethrowException($e, $this, $statement);
}
Doctrine_Connection::query (   $query,
array  $params = array(),
  $hydrationMode = null 
)
inherited

query queries the database using Doctrine Query Language returns a collection of Doctrine_Record objects

$users = $conn->query('SELECT u.* FROM User u');

$users = $conn->query('SELECT u.* FROM User u WHERE u.name LIKE ?', array('someone'));

Parameters
string$queryDQL query
array$paramsquery parameters
int$hydrationModeDoctrine_Core::HYDRATE_ARRAY or Doctrine_Core::HYDRATE_RECORD
See Also
Doctrine_Query
Returns
Doctrine_Collection Collection of Doctrine_Record objects

Definition at line 894 of file Connection.php.

{
$parser = Doctrine_Query::create($this);
$res = $parser->query($query, $params, $hydrationMode);
$parser->free();
return $res;
}
Doctrine_Connection::queryOne (   $query,
array  $params = array() 
)
inherited

query queries the database using Doctrine Query Language and returns the first record found

$user = $conn->queryOne('SELECT u.* FROM User u WHERE u.id = ?', array(1));

$user = $conn->queryOne('SELECT u.* FROM User u WHERE u.name LIKE ? AND u.password = ?', array('someone', 'password') );

Parameters
string$queryDQL query
array$paramsquery parameters
See Also
Doctrine_Query
Returns
Doctrine_Record|false Doctrine_Record object on success, boolean false on failure

Definition at line 951 of file Connection.php.

{
$coll = $parser->query($query, $params);
if ( ! $coll->contains(0)) {
return false;
}
return $coll[0];
}
Doctrine_Connection::quote (   $input,
  $type = null 
)
inherited

quote quotes given input parameter

Parameters
mixed$inputparameter to be quoted
string$type
Returns
string

Definition at line 775 of file Connection.php.

{
return $this->formatter->quote($input, $type);
}
Doctrine_Connection::quoteIdentifier (   $str,
  $checkOption = true 
)
inherited

Quote a string so it can be safely used as a table or column name

Delimiting style depends on which database driver is being used.

NOTE: just because you CAN use delimited identifiers doesn't mean you SHOULD use them. In general, they end up causing way more problems than they solve.

Portability is broken by using the following characters inside delimited identifiers:

  • backtick (`) – due to MySQL
  • double quote (") – due to Oracle
  • brackets ([ or ]) – due to Access

Delimited identifiers are known to generally work correctly under the following drivers:

  • mssql
  • mysql
  • mysqli
  • oci8
  • pgsql
  • sqlite

InterBase doesn't seem to be able to use delimited identifiers via PHP 4. They work fine under PHP 5.

Parameters
string$stridentifier name to be quoted
bool$checkOptioncheck the 'quote_identifier' option
Returns
string quoted identifier string

Definition at line 722 of file Connection.php.

{
// quick fix for the identifiers that contain a dot
if (strpos($str, '.')) {
$e = explode('.', $str);
return $this->formatter->quoteIdentifier($e[0], $checkOption) . '.'
. $this->formatter->quoteIdentifier($e[1], $checkOption);
}
return $this->formatter->quoteIdentifier($str, $checkOption);
}
Doctrine_Connection::quoteMultipleIdentifier (   $arr,
  $checkOption = true 
)
inherited

quoteMultipleIdentifier Quotes multiple identifier strings

Parameters
array$arridentifiers array to be quoted
bool$checkOptioncheck the 'quote_identifier' option
Returns
string quoted identifier string

Definition at line 743 of file Connection.php.

{
foreach ($arr as $k => $v) {
$arr[$k] = $this->quoteIdentifier($v, $checkOption);
}
return $arr;
}
Doctrine_Connection::replace ( Doctrine_Table  $table,
array  $fields,
array  $keys 
)
inherited

Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT query, except that if there is already a row in the table with the same key field values, the REPLACE query just updates its values instead of inserting a new row.

The REPLACE type of query does not make part of the SQL standards. Since practically only MySQL and SQLIte implement it natively, this type of query isemulated through this method for other DBMS using standard types of queries inside a transaction to assure the atomicity of the operation.

Parameters
stringname of the table on which the REPLACE query will be executed.
arrayan associative array that describes the fields and the values that will be inserted or updated in the specified table. The indexes of the array are the names of all the fields of the table.

The values of the array are values to be assigned to the specified field.

Parameters
array$keysan array containing all key fields (primary key fields or unique index fields) for this table

the uniqueness of a row will be determined according to the provided key fields

this method will fail if no key fields are specified

Exceptions
Doctrine_Connection_Exceptionif this driver doesn't support replace
Doctrine_Connection_Exceptionif some of the key values was null
Doctrine_Connection_Exceptionif there were no key fields
PDOExceptionif something fails at PDO level @ return integer number of rows affected

Definition at line 566 of file Connection.php.

{
if (empty($keys)) {
throw new Doctrine_Connection_Exception('Not specified which fields are keys');
}
$identifier = (array) $table->getIdentifier();
$condition = array();
foreach ($fields as $fieldName => $value) {
if (in_array($fieldName, $keys)) {
if ($value !== null) {
$condition[] = $table->getColumnName($fieldName) . ' = ?';
$conditionValues[] = $value;
}
}
}
$affectedRows = 0;
if ( ! empty($condition) && ! empty($conditionValues)) {
$query = 'DELETE FROM ' . $this->quoteIdentifier($table->getTableName())
. ' WHERE ' . implode(' AND ', $condition);
$affectedRows = $this->exec($query, $conditionValues);
}
$this->insert($table, $fields);
$affectedRows++;
return $affectedRows;
}
Doctrine_Connection::rethrowException ( Exception  $e,
  $invoker,
  $query = null 
)
inherited

rethrowException

Exceptions
Doctrine_Connection_Exception

Definition at line 1069 of file Connection.php.

{
$event = new Doctrine_Event($this, Doctrine_Event::CONN_ERROR);
$this->getListener()->preError($event);
$name = 'Doctrine_Connection_' . $this->driverName . '_Exception';
$message = $e->getMessage();
if ($query) {
$message .= sprintf('. Failing Query: "%s"', $query);
}
$exc = new $name($message, (int) $e->getCode());
if ( ! isset($e->errorInfo) || ! is_array($e->errorInfo)) {
$e->errorInfo = array(null, null, null, null);
}
$exc->processErrorInfo($e->errorInfo);
if ($this->getAttribute(Doctrine_Core::ATTR_THROW_EXCEPTIONS)) {
throw $exc;
}
$this->getListener()->postError($event);
}
Doctrine_Connection::rollback (   $savepoint = null)
inherited

rollback Cancel any database changes done during a transaction or since a specific savepoint that is in progress. This function may only be called when auto-committing is disabled, otherwise it will fail. Therefore, a new transaction is implicitly started after canceling the pending changes.

this method can be listened with onPreTransactionRollback and onTransactionRollback eventlistener methods

Parameters
string$savepointname of a savepoint to rollback to
Exceptions
Doctrine_Transaction_Exceptionif the rollback operation fails at database level
Returns
boolean false if rollback couldn't be performed, true otherwise

Definition at line 1412 of file Connection.php.

{
return $this->transaction->rollback($savepoint);
}
Doctrine_Connection::select (   $query,
  $limit = 0,
  $offset = 0 
)
inherited

queries the database with limit and offset added to the query and returns a Doctrine_Connection_Statement object

Parameters
string$query
integer$limit
integer$offset
Returns
Doctrine_Connection_Statement

Definition at line 971 of file Connection.php.

{
if ($limit > 0 || $offset > 0) {
$query = $this->modifyLimitQuery($query, $limit, $offset);
}
return $this->execute($query);
}
Doctrine_Connection::serialize ( )
inherited

Serialize. Remove database connection(pdo) since it cannot be serialized

Returns
string $serialized

Definition at line 1562 of file Connection.php.

{
$vars = get_object_vars($this);
$vars['dbh'] = null;
$vars['isConnected'] = false;
return serialize($vars);
}
Doctrine_Connection::setAttribute (   $attribute,
  $value 
)
inherited

setAttribute sets an attribute

Todo:
why check for >= 100? has this any special meaning when creating attributes?
Parameters
integer$attribute
mixed$value
Returns
boolean

Definition at line 335 of file Connection.php.

{
if ($attribute >= 100 && $attribute < 1000) {
parent::setAttribute($attribute, $value);
} else {
if ($this->isConnected) {
$this->dbh->setAttribute($attribute, $value);
} else {
$this->pendingAttributes[$attribute] = $value;
}
}
return $this;
}
Doctrine_Configurable::setCharset (   $charset)
inherited

Set the charset

Parameters
string$charset

Definition at line 370 of file Configurable.php.

{
$this->setAttribute(Doctrine_Core::ATTR_DEFAULT_TABLE_CHARSET, $charset);
}
Doctrine_Configurable::setCollate (   $collate)
inherited

Set the collate

Parameters
string$collate

Definition at line 390 of file Configurable.php.

{
$this->setAttribute(Doctrine_Core::ATTR_DEFAULT_TABLE_COLLATE, $collate);
}
Doctrine_Connection::setDateFormat (   $format = null)
inherited

Set the date/time format for the current connection

Parameters
stringtime format
Returns
void

Definition at line 787 of file Connection.php.

{
}
Doctrine_Configurable::setEventListener (   $listener)
inherited
Parameters
Doctrine_EventListener$listener
Returns
void

Definition at line 214 of file Configurable.php.

{
return $this->setListener($listener);
}
Doctrine_Configurable::setImpl (   $template,
  $class 
)
inherited

setImpl binds given class to given template name

this method is the base of Doctrine dependency injection

Parameters
string$templatename of the class template
string$classname of the class to be bound
Returns
Doctrine_Configurable this object

Definition at line 174 of file Configurable.php.

{
$this->_impl[$template] = $class;
return $this;
}
Doctrine_Configurable::setListener (   $listener)
inherited

setListener

Parameters
Doctrine_EventListener_Interface | Doctrine_Overloadable$listener
Returns
Doctrine_Configurable this object

Definition at line 311 of file Configurable.php.

{
if ( ! ($listener instanceof Doctrine_EventListener_Interface)
&& ! ($listener instanceof Doctrine_Overloadable)
) {
throw new Doctrine_EventListener_Exception("Couldn't set eventlistener. EventListeners should implement either Doctrine_EventListener_Interface or Doctrine_Overloadable");
}
$this->attributes[Doctrine_Core::ATTR_LISTENER] = $listener;
return $this;
}
Doctrine_Locator_Injectable::setLocator ( Doctrine_Locator  $locator)
inherited

setLocator this method can be used for setting the locator object locally

Parameters
Doctrine_Locatorthe locator object
Returns
Doctrine_Locator_Injectable this instance

Definition at line 60 of file Injectable.php.

{
$this->_locator = $locator;
return $this;
}
Doctrine_Connection::setName (   $name)
inherited

setName

Sets the name of the connection

Parameters
string$name
Returns
void

Definition at line 369 of file Connection.php.

{
$this->_name = $name;
}
Doctrine_Connection::setOption (   $option,
  $value 
)
inherited

setOption

Set option value

Parameters
string$option
Returns
void

Definition at line 269 of file Connection.php.

{
return $this->options[$option] = $value;
}
Doctrine_Configurable::setParent ( Doctrine_Configurable  $component)
inherited

sets a parent for this configurable component the parent must be configurable component itself

Parameters
Doctrine_Configurable$component
Returns
void

Definition at line 412 of file Configurable.php.

{
$this->parent = $component;
}
Doctrine_Configurable::setRecordListener (   $listener)
inherited

setListener

Parameters
Doctrine_EventListener_Interface | Doctrine_Overloadable$listener
Returns
Doctrine_Configurable this object

Definition at line 259 of file Configurable.php.

{
if ( ! ($listener instanceof Doctrine_Record_Listener_Interface)
&& ! ($listener instanceof Doctrine_Overloadable)
) {
throw new Doctrine_Exception("Couldn't set eventlistener. Record listeners should implement either Doctrine_Record_Listener_Interface or Doctrine_Overloadable");
}
$this->attributes[Doctrine_Core::ATTR_RECORD_LISTENER] = $listener;
return $this;
}
Doctrine_Connection::standaloneQuery (   $query,
  $params = array() 
)
inherited

standaloneQuery

Parameters
string$querysql query
array$paramsquery parameters
Returns
PDOStatement|Doctrine_Adapter_Statement

Definition at line 987 of file Connection.php.

{
return $this->execute($query, $params);
}
array $supported an array containing all features this driver Doctrine_Connection::supports (   $feature)
inherited

supports

Parameters
string$featurethe name of the feature
Returns
boolean whether or not this drivers supports given feature

keys representing feature names and values as one of the following (true, false, 'emulated')

Definition at line 525 of file Connection.php.

{
return (isset($this->supported[$feature])
&& ($this->supported[$feature] === 'emulated'
|| $this->supported[$feature]));
}
Doctrine_Connection::unserialize (   $serialized)
inherited

Unserialize. Recreate connection from serialized content

Parameters
string$serialized
Returns
void

Definition at line 1576 of file Connection.php.

{
$array = unserialize($serialized);
foreach ($array as $name => $values) {
$this->$name = $values;
}
}
Doctrine_Configurable::unsetAttribute (   $attribute)
inherited

Unset an attribute from this levels attributes

Parameters
integer$attribute
Returns
void

Definition at line 347 of file Configurable.php.

{
if (isset($this->attributes[$attribute])) {
unset($this->attributes[$attribute]);
}
}
Doctrine_Connection::update ( Doctrine_Table  $table,
array  $fields,
array  $identifier 
)
inherited

Updates table row(s) with specified data.

Exceptions
Doctrine_Connection_Exceptionif something went wrong at the database level
Parameters
Doctrine_Table$tableThe table to insert data into
array$valuesAn associative array containing column-value pairs. Values can be strings or Doctrine_Expression instances.
Returns
integer the number of affected rows. Boolean false if empty value array was given,

Definition at line 630 of file Connection.php.

{
if (empty($fields)) {
return false;
}
$set = array();
foreach ($fields as $fieldName => $value) {
if ($value instanceof Doctrine_Expression) {
$set[] = $this->quoteIdentifier($table->getColumnName($fieldName)) . ' = ' . $value->getSql();
unset($fields[$fieldName]);
} else {
$set[] = $this->quoteIdentifier($table->getColumnName($fieldName)) . ' = ?';
}
}
$params = array_merge(array_values($fields), array_values($identifier));
$sql = 'UPDATE ' . $this->quoteIdentifier($table->getTableName())
. ' SET ' . implode(', ', $set)
. ' WHERE ' . implode(' = ? AND ', $this->quoteMultipleIdentifier($table->getIdentifierColumnNames()))
. ' = ?';
return $this->exec($sql, $params);
}

Field Documentation

string Doctrine_Connection::$_name
protectedinherited

$_name

Name of the connection

Definition at line 76 of file Connection.php.

string Doctrine_Connection::$driverName
protectedinherited

The name of this connection driver.

Definition at line 83 of file Connection.php.


The documentation for this class was generated from the following file: