Driver.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Interface for Drivers
  4. *
  5. * PHP version 5
  6. *
  7. * @category Text
  8. * @package Text_CAPTCHA
  9. * @author Michael Cramer <michael@bigmichi1.de>
  10. * @license http://www.opensource.org/licenses/bsd-license.php BSD License
  11. * @link http://pear.php.net/package/Text_CAPTCHA
  12. */
  13. /**
  14. * Interface for Text_CAPTCHA drivers
  15. *
  16. * @category Text
  17. * @package Text_CAPTCHA
  18. * @author Michael Cramer <michael@bigmichi1.de>
  19. * @license http://www.opensource.org/licenses/bsd-license.php BSD License
  20. * @link http://pear.php.net/package/Text_CAPTCHA
  21. */
  22. interface Text_CAPTCHA_Driver
  23. {
  24. /**
  25. * Clear the internal state of the driver.
  26. *
  27. * @return void
  28. */
  29. function resetDriver();
  30. /**
  31. * Initialize the driver with the given options.
  32. *
  33. * @param array $options options for the driver as array
  34. *
  35. * @return void
  36. * @throws Text_CAPTCHA_Exception something went wrong during init
  37. */
  38. function initDriver($options);
  39. /**
  40. * Generate the CAPTCHA.
  41. *
  42. * @return void
  43. * @throws Text_CAPTCHA_Exception something went wrong during creation of CAPTCHA
  44. */
  45. function createCAPTCHA();
  46. /**
  47. * Generate the phrase for the CAPTCHA.
  48. *
  49. * @return void
  50. * @throws Text_CAPTCHA_Exception something went wrong during creation of phrase
  51. */
  52. function createPhrase();
  53. }