public function QueryAlterableInterface::addMetaData

Adds additional metadata to the query.

Often, a query may need to provide additional contextual data to alter hooks. Alter hooks may then use that information to decide if and how to take action.

Parameters

$key: The unique identifier for this piece of metadata. Must be a string that follows the same rules as any other PHP identifier.

$object: The additional data to add to the query. May be any valid PHP variable.

Return value

QueryAlterableInterface The called object.

2 methods override QueryAlterableInterface::addMetaData()
SelectQuery::addMetaData in drupal/includes/database/select.inc
Adds additional metadata to the query.
SelectQueryExtender::addMetaData in drupal/includes/database/select.inc
Adds additional metadata to the query.

File

drupal/includes/database/query.inc, line 236
Non-specific Database query code. Used by all engines.

Class

QueryAlterableInterface
Interface for a query that can be manipulated via an alter hook.

Code

public function addMetaData($key, $object);