コード例 #1
0
 /**
  * @param ConstraintInterface $constraint
  * @param mixed $value
  * @return bool
  */
 protected function processConstraint($constraint, $value)
 {
     $passed = $constraint->check($value);
     if (!$passed) {
         $this->failedConstraint = $constraint;
     }
     return $passed;
 }
コード例 #2
0
ファイル: AbstractConstraint.php プロジェクト: aWEBoLabs/taxi
 /**
  * @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;
 }
コード例 #3
0
ファイル: LogicalNot.php プロジェクト: khanhdeux/typo3test
 /**
  * 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);
 }