Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function SelectQueryExtender::extend

Enhance this object by wrapping it in an extender object.

Parameters

$extender_name: The base name of the extending class. The base name will be checked against the current database connection to allow driver-specific subclasses as well, using the same logic as the query objects themselves. For example, PagerDefault_mysql is the MySQL-specific override for PagerDefault.

Return value

QueryExtendableInterface The extender object, which now contains a reference to this object.

Overrides QueryExtendableInterface::extend

File

includes/database/select.inc, line 666

Class

SelectQueryExtender
The base extender class for Select queries.

Code

public function extend($extender_name) {
 // The extender can be anywhere so this needs to go to the registry, which
 // is surely loaded by now.
 $class = $this->connection 
 ->getDriverClass ($extender_name, array(), TRUE);
 return new $class($this, $this->connection );
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.