interface ExtendableInterface
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Query/ExtendableInterface.php \Drupal\Core\Database\Query\ExtendableInterface
- 8.9.x core/lib/Drupal/Core/Database/Query/ExtendableInterface.php \Drupal\Core\Database\Query\ExtendableInterface
- 11.x core/lib/Drupal/Core/Database/Query/ExtendableInterface.php \Drupal\Core\Database\Query\ExtendableInterface
Interface for extendable query objects.
"Extenders" follow the "Decorator" OOP design pattern. That is, they wrap and "decorate" another object. In our case, they implement the same interface as select queries and wrap a select query, to which they delegate almost all operations. Subclasses of this class may implement additional methods or override existing methods as appropriate. Extenders may also wrap other extender objects, allowing for arbitrarily complex "enhanced" queries.
Hierarchy
- interface \Drupal\Core\Database\Query\ExtendableInterface
Expanded class hierarchy of ExtendableInterface
All classes that implement ExtendableInterface
File
-
core/
lib/ Drupal/ Core/ Database/ Query/ ExtendableInterface.php, line 15
Namespace
Drupal\Core\Database\QueryView source
interface ExtendableInterface {
/**
* Enhance this object by wrapping it in an extender object.
*
* @param $extender_name
* The fully-qualified name of the extender class, without the leading '\'
* (for example, Drupal\my_module\myExtenderClass). The extender 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 \Drupal\Core\Database\Query\ExtendableInterface
* The extender object, which now contains a reference to this object.
*/
public function extend($extender_name);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ExtendableInterface::extend | public | function | Enhance this object by wrapping it in an extender object. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.