iValidate.php 888 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Luracast\Restler\Data;
  3. /**
  4. * Validation classes should implement this interface
  5. *
  6. * @category Framework
  7. * @package Restler
  8. * @author R.Arul Kumaran <arul@luracast.com>
  9. * @copyright 2010 Luracast
  10. * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
  11. * @link http://luracast.com/products/restler/
  12. *
  13. */
  14. interface iValidate {
  15. /**
  16. * method used for validation.
  17. *
  18. * @param mixed $input
  19. * data that needs to be validated
  20. * @param ValidationInfo $info
  21. * information to be used for validation
  22. * @return boolean false in case of failure or fixed value in the expected
  23. * type
  24. * @throws \Luracast\Restler\RestException 400 with information about the
  25. * failed
  26. * validation
  27. */
  28. public static function validate($input, ValidationInfo $info);
  29. }