| 1 database.inc | public DatabaseConnection::setTarget($target = NULL) | 
Tells this connection object what its target value is.
This is needed for logging and auditing. It's sloppy to do in the constructor because the constructor for child classes has a different signature. We therefore also ensure that this function is only ever called once.
Parameters
string $target: The target this connection is for.
File
- core/includes/ database/ database.inc, line 574 
- Core systems for the database layer.
Class
- DatabaseConnection
- Base Database API class.
Code
public function setTarget($target = NULL) {
  if (!isset($this->target)) {
    $this->target = $target;
  }
}
