public function SelectExtender::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.

Return value

Drupal\Core\Database\Query\ExtendableInterface The extender object, which now contains a reference to this object.

Overrides ExtendableInterface::extend

File

drupal/core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 143
Definition of Drupal\Core\Database\Query\SelectExtender

Class

SelectExtender
The base extender class for Select queries.

Namespace

Drupal\Core\Database\Query

Code

public function extend($extender_name) {
  $class = $this->connection
    ->getDriverClass($extender_name);
  return new $class($this, $this->connection);
}