You are here

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\Violation

Code

public function setCause($cause) {
  $this->cause = $cause;
  return $this;
}