function Traverse::__construct
Parameters
bool|array<string,mixed>|null $traverse Whether to traverse the given object or not (defaults to true). Pass an associative array to configure the constraint's options (e.g. payload).:
Overrides Constraint::__construct
File
-
vendor/
symfony/ validator/ Constraints/ Traverse.php, line 30
Class
- Traverse
- Validates an object that needs to be traversed.
Namespace
Symfony\Component\Validator\ConstraintsCode
public function __construct(bool|array|null $traverse = null) {
if (\is_array($traverse) && \array_key_exists('groups', $traverse)) {
throw new ConstraintDefinitionException(\sprintf('The option "groups" is not supported by the constraint "%s".', __CLASS__));
}
parent::__construct($traverse);
}