CaptchaInterface.php 688 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Captcha interface
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Captcha\Model;
  9. /**
  10. * Captcha Model Interface
  11. *
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface CaptchaInterface
  16. {
  17. /**
  18. * Generates captcha
  19. *
  20. * @abstract
  21. * @return void
  22. */
  23. public function generate();
  24. /**
  25. * Checks whether word entered by user corresponds to the one generated by generate()
  26. *
  27. * @param string $word
  28. * @return bool
  29. * @abstract
  30. */
  31. public function isCorrect($word);
  32. /**
  33. * Get Block Name
  34. * @return string
  35. */
  36. public function getBlockName();
  37. }