function Expression::__construct
Constructor.
Parameters
string $expression: The expression text. Never include user input in the expression text; pass it through $arguments placeholders instead.
array<string,string|int|float|bool> $arguments: (optional) The expression arguments, keyed by placeholder name.
File
-
core/
lib/ Drupal/ Core/ Database/ Expression.php, line 19
Class
- Expression
- A value object representing an expression with its arguments.
Namespace
Drupal\Core\DatabaseCode
public function __construct(public readonly string $expression, public readonly array $arguments = []) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.