3 namespace Drupal\Core\Database\Query;
6 * Interface for extendable query objects.
8 * "Extenders" follow the "Decorator" OOP design pattern. That is, they wrap
9 * and "decorate" another object. In our case, they implement the same
10 * interface as select queries and wrap a select query, to which they delegate
11 * almost all operations. Subclasses of this class may implement additional
12 * methods or override existing methods as appropriate. Extenders may also wrap
13 * other extender objects, allowing for arbitrarily complex "enhanced" queries.
15 interface ExtendableInterface {
18 * Enhance this object by wrapping it in an extender object.
20 * @param $extender_name
21 * The fully-qualified name of the extender class, without the leading '\'
22 * (for example, Drupal\my_module\myExtenderClass). The extender name will
23 * be checked against the current database connection to allow
24 * driver-specific subclasses as well, using the same logic as the query
27 * @return \Drupal\Core\Database\Query\ExtendableInterface
28 * The extender object, which now contains a reference to this object.
30 public function extend($extender_name);