public function addConstraint(Constraint
$constraint):
static { $this->
checkConstraint($constraint);
if ($constraint instanceof Traverse
) { if ($constraint->traverse
) { // If traverse is true, traversal should be explicitly enabled
$this->traversalStrategy = TraversalStrategy::TRAVERSE;
} else { // If traverse is false, traversal should be explicitly disabled
$this->traversalStrategy = TraversalStrategy::NONE;
} // The constraint is not added