public function Select::arguments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Database/Query/Select.php \Drupal\Core\Database\Query\Select::arguments()
Gets a complete list of all values to insert into the prepared statement.
Return value
An associative array of placeholders and values.
Overrides QueryConditionTrait::arguments
1 call to Select::arguments()
- Select::getArguments in core/
lib/ Drupal/ Core/ Database/ Query/ Select.php - Compiles and returns an associative array of the arguments for this prepared statement.
File
- core/
lib/ Drupal/ Core/ Database/ Query/ Select.php, line 189 - Contains \Drupal\Core\Database\Query\Select.
Class
- Select
- Query builder for SELECT statements.
Namespace
Drupal\Core\Database\QueryCode
public function arguments() {
if (!$this
->compiled()) {
return NULL;
}
$args = $this->condition
->arguments() + $this->having
->arguments();
foreach ($this->tables as $table) {
if ($table['arguments']) {
$args += $table['arguments'];
}
// If this table is a subquery, grab its arguments recursively.
if ($table['table'] instanceof SelectInterface) {
$args += $table['table']
->arguments();
}
}
foreach ($this->expressions as $expression) {
if ($expression['arguments']) {
$args += $expression['arguments'];
}
}
// If there are any dependent queries to UNION,
// incorporate their arguments recursively.
foreach ($this->union as $union) {
$args += $union['query']
->arguments();
}
return $args;
}