/** * @param ConstraintInterface $constraint * @param mixed $value * @return bool */ protected function processConstraint($constraint, $value) { $passed = $constraint->check($value); if (!$passed) { $this->failedConstraint = $constraint; } return $passed; }
/** * @param ConstraintInterface $provider * * @return bool */ public function matches(ConstraintInterface $provider) { if ($provider instanceof MultiConstraint) { // turn matching around to find a match return $provider->matches($this); } if ($provider instanceof $this) { // see note at bottom of this class declaration return $this->matchSpecific($provider); } return true; }
/** * Fills an array with the names of all bound variables in the constraint * * @param array &$boundVariables * @return void */ public function collectBoundVariableNames(&$boundVariables) { $this->constraint->collectBoundVariableNames($boundVariables); }