Skip to content
Search
DSL · Telemetry

attribute_rule

Definition

/**
 * Create a single attribute-matching rule for an AttributeFilter.
 *
 * @param array<string>|string $path attribute path: a top-level key, or segments descending into nested array values
 * @param MatchMode $mode comparison applied between the value at the path and the expected value
 * @param bool|DateTimeInterface|float|int|string $expected expected value (must be a string for the pattern modes)
 * @param bool $caseSensitive applies to the substring modes only (STARTS_WITH, ENDS_WITH, CONTAINS)
 */
attribute_rule(array|string $path, MatchMode $mode, DateTimeInterface|string|int|float|bool $expected, bool $caseSensitive) : AttributeRule

Contributors

Built in the open.

Join us on GitHub
scroll back to top