LimeConstraintInterface.php 890 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of the Lime test framework.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. * (c) Bernhard Schussek <bernhard.schussek@symfony-project.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. /**
  12. * Tests whether a value satisfies a constraint.
  13. *
  14. * @package Lime
  15. * @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
  16. * @version SVN: $Id: LimeConstraintInterface.php 23701 2009-11-08 21:23:40Z bschussek $
  17. */
  18. interface LimeConstraintInterface
  19. {
  20. /**
  21. * Evaluates the constraint for the given value.
  22. *
  23. * If the evaluation fails, a LimeConstraintException with details about the
  24. * error is thrown.
  25. *
  26. * @param mixed $value
  27. * @throws LimeConstraintException If the evaluation fails
  28. */
  29. public function evaluate($value);
  30. }