interface QueryExtendableInterface

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

Expanded class hierarchy of QueryExtendableInterface

All classes that implement QueryExtendableInterface

Related topics

File

drupal-7.x/includes/database/select.inc, line 20

View source
interface QueryExtendableInterface {

  /**
   * Enhance this object by wrapping it in an extender object.
   *
   * @param $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 QueryExtendableInterface
   *   The extender object, which now contains a reference to this object.
   */
  public function extend($extender_name);
}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
QueryExtendableInterface::extend public function Enhance this object by wrapping it in an extender object.