Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / Database / Query / ExtendableInterface.php
1 <?php
2
3 namespace Drupal\Core\Database\Query;
4
5 /**
6  * Interface for extendable query objects.
7  *
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.
14  */
15 interface ExtendableInterface {
16
17   /**
18    * Enhance this object by wrapping it in an extender object.
19    *
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
25    *   objects themselves.
26    *
27    * @return \Drupal\Core\Database\Query\ExtendableInterface
28    *   The extender object, which now contains a reference to this object.
29    */
30   public function extend($extender_name);
31
32 }