public function ConstraintViolationBuilder::setCause in Plug 7
Sets the cause of the violation.
Parameters
mixed $cause The cause of the violation:
Return value
ConstraintViolationBuilderInterface This builder
Overrides ConstraintViolationBuilderInterface::setCause
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ ConstraintViolationBuilder.php, line 177
Class
- ConstraintViolationBuilder
- Default implementation of {@link ConstraintViolationBuilderInterface}.
Namespace
Symfony\Component\Validator\ViolationCode
public function setCause($cause) {
$this->cause = $cause;
return $this;
}